#!/usr/bin/env python3

while(True):
	try:
		a,b=map(int, input().split())
	except EOFError:
		break

	#euclidian algorithm	
	r=a%b
	x,y=a,b
	while(r>0):
		x=y
		y=r
		r=x%y
	gcd=y
	lcm=int(a*b/gcd)
	print("{0} {1}".format(gcd, lcm)) while(True):
	try:
		a,b=map(int, input().split())
	except EOFError:
		break

	#euclidian algorithm	
	r=a%b
	x,y=a,b
	while(r>0):
		x=y
		y=r
		r=x%y
	gcd=y
	lcm=int(a*b/gcd)
	print("{0} {1}".format(gcd, lcm)) True try:
		a,b=map(int, input().split())
	except EOFError:
		break

	#euclidian algorithm	
	 except EOFError:
		break

	#euclidian algorithm	
	 break a,b=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b r=a%b r a%b a b x,y=a,b x a y b while(r>0):
		x=y
		y=r
		r=x%y
	 r>0 r 0 x=y x y y=r y r r=x%y r x%y x y gcd=y gcd y lcm=int(a*b/gcd) lcm int(a*b/gcd) int a*b/gcd a*b a b gcd print("{0} {1}".format(gcd, lcm)) print "{0} {1}".format(gcd, lcm) "{0} {1}".format "{0} {1}" format gcd lcm y=r r y r=x%y x%y r lcm=int(a*b/gcd) int(a*b/gcd) lcm r=a%b a%b r gcd=y y gcd b=map(int, input().split()) map(int, input().split()) b x=y y x a,b=map(int, input().split()) map(int, input().split()) a y=a,b b y x,y=a,b a x
#!/usr/bin/env python3

while(True):
	try:
		a,b=map(int, input().split())
	except EOFError:
		break

	#euclidian algorithm	
	r=a%b
	x,y=a,b
	while(r>0):
		x=y
		y=r
		r=x%y
	gcd=y
	lcm=int(a*b/gcd)
	print("{0} {1}".format(gcd, lcm))