a=4
b=2
def gcd(a,b):
	   return a if b==0 else gcd(b,a%b)

def lcm(a,b):
   return a*b//gcd(a,b)	   
print(gcd(a,b))#最大公约数
print(lcm(a,b))#最小公倍数