import random
class myClass:
    
    
    def amicableNumbers(self):
        sum1=0
        sum2=0
        num1=1
        num2=1
        z= 2*(10**7956785)
        zz= z+100000000
        while (sum1 != num2 and sum2 != num1):
            num1,num2= random.randint(z,zz), random.randint(z,zz)
            for i in range(1,num1):
                if(num1 % i == 0):
                    sum1+=i
            for i in range(1,num2):
                if(num2 % i == 0):
                    sum2+=i
            
            if(sum1 == num2 and sum2 == num1):
                print(num1,'and',num2,"are Amicable Numbers")
            else: 
                sum1=0
                sum2=0
            
def main():       
    
    obj1=myClass()
    obj1.amicableNumbers()
    
    
if "__main__" :
    main()
i have asked this question previously but need more elaboration than previous. the suggestions went along the lines of 'have you checked if it will ever be true' it will be. i checked.
 
    