import sys
import fractions as f
for l in sys.stdin.readlines():
	a,b=map(int,l.split())
	print f.gcd(a,b),a*b/f.gcd(a,b) import sys sys import fractions as f fractions for l in sys.stdin.readlines():
	a,b=map(int,l.split())
	print f.gcd(a,b),a*b/f.gcd(a,b) l sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines a,b=map(int,l.split()) a map(int,l.split()) map int l.split() l.split l split b print f.gcd(a,b) f.gcd f gcd a b a*b/f.gcd(a,b) a*b a b f.gcd(a,b) f.gcd f gcd a b a,b=map(int,l.split()) map(int,l.split()) a b=map(int,l.split()) map(int,l.split()) b
import sys
import fractions as f
for l in sys.stdin.readlines():
	a,b=map(int,l.split())
	print f.gcd(a,b),a*b/f.gcd(a,b)