# Nombres amicaux
def sdiv(n):
    s=0
    for i in range(1,n):
        if n%i==0:
            s=s+i
    return(s)

def ami(n,p):
    for i in range(1,n+1):
        for j in range(i+1,p+1):
            if sdiv(i)==j and sdiv(j)==i:
                print(i,j)



