#python code to calculate the lcm and gcd of 2 numbers

a=int(input('enter a no: '))
b=int(input('enter another no: '))
if a>b:
    c=b
else:
    c=a
for i in range(1,c+1):
    if((a%i==0) and (b%i==0)):
        gcd=i
lcm=(a*b)/gcd
print('gcd = ',gcd)
print('lcm = ',lcm)                
