7-19 sdut-最大公约数和最小公倍数
def gcd(a,b):
if a%b == 0:
return b
else :
return gcd(b,a%b)
while 1:
try:
a, b = map(int, input().split())
ma=gcd(a,b)
print("{} {}".format(ma,int(a*b/ma)))
except:
break