import sys

while True:
    try:
	a,b = map(int,raw_input().split())
	tempa = a
	tempb = b
	while tempa % tempb != 0 :
	    tempa , tempb = (tempb,tempa%tempb)
	gcd = tempb
	lcm = a * b / gcd
	print "%d %d" % ( gcd, lcm)
	

    except EOFError:
	break import sys sys while True:
    try:
	a,b = map(int,raw_input().split())
	tempa = a
	tempb = b
	while tempa % tempb != 0 :
	    tempa , tempb = (tempb,tempa%tempb)
	gcd = tempb
	lcm = a * b / gcd
	print "%d %d" % ( gcd, lcm)
	

    except EOFError:
	break True try:
	a,b = map(int,raw_input().split())
	tempa = a
	tempb = b
	while tempa % tempb != 0 :
	    tempa , tempb = (tempb,tempa%tempb)
	gcd = tempb
	lcm = a * b / gcd
	print "%d %d" % ( gcd, lcm)
	

    except EOFError:
	break except EOFError:
	break break a,b = map(int,raw_input().split()) a map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split b tempa = a tempa a tempb = b tempb b while tempa % tempb != 0 :
	    tempa , tempb = (tempb,tempa%tempb)
	 tempa % tempb != 0 tempa % tempb tempa tempb 0 tempa , tempb = (tempb,tempa%tempb) tempa (tempb,tempa%tempb) tempb tempa%tempb tempa tempb tempb gcd = tempb gcd tempb lcm = a * b / gcd lcm a * b / gcd a * b a b gcd print "%d %d" % ( gcd, lcm) "%d %d" ( gcd, lcm) gcd lcm a,b = map(int,raw_input().split()) map(int,raw_input().split()) a gcd = tempb tempb gcd tempa = a a tempa b = map(int,raw_input().split()) map(int,raw_input().split()) b tempa , tempb = (tempb,tempa%tempb) (tempb,tempa%tempb) tempa tempb = b b tempb lcm = a * b / gcd a * b / gcd lcm tempb = (tempb,tempa%tempb) (tempb,tempa%tempb) tempb
import sys

while True:
    try:
	a,b = map(int,raw_input().split())
	tempa = a
	tempb = b
	while tempa % tempb != 0 :
	    tempa , tempb = (tempb,tempa%tempb)
	gcd = tempb
	lcm = a * b / gcd
	print "%d %d" % ( gcd, lcm)
	

    except EOFError:
	break