Run ID:66903

提交时间:2024-03-11 15:07:26

a,b = list(map(int,input().split())) def max_common_divisor(x,y): if x<y: x,y = y,x t = y while t!=1: if x%t==0 and y%t==0: break t -=1 return t def min_product(a,b): t = max(a,b) while True: if t%a ==0 and t%b ==0: break t +=1 return t res1 = max_common_divisor(a,b) res2 = min_product(a,b) print(res1,res2)