# AOJ 0005 GCD and LCM
# Python3 2018.6.9 bal4u

def lcm(a, b):
	return a // gcd(a, b) * b

def gcd(a, b):
	while b != 0:
		r = a % b
		a = b
		b = r
	return a

while True:
    try:
        a = list(map(int, input().split()))
        print(gcd(a[0], a[1]), lcm(a[0], a[1]))
    except EOFError:
        break def lcm(a, b):
	return a // gcd(a, b) * b lcm return a // gcd(a, b) * b a // gcd(a, b) * b a // gcd(a, b) a gcd(a, b) gcd a b b a a b b def gcd(a, b):
	while b != 0:
		r = a % b
		a = b
		b = r
	return a gcd while b != 0:
		r = a % b
		a = b
		b = r
	 b != 0 b 0 r = a % b r a % b a b a = b a b b = r b r return a a a a b b while True:
    try:
        a = list(map(int, input().split()))
        print(gcd(a[0], a[1]), lcm(a[0], a[1]))
    except EOFError:
        break True try:
        a = list(map(int, input().split()))
        print(gcd(a[0], a[1]), lcm(a[0], a[1]))
    except EOFError:
        break except EOFError:
        break break a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split print(gcd(a[0], a[1]), lcm(a[0], a[1])) print gcd(a[0], a[1]) gcd a[0] a 0 a[1] a 1 lcm(a[0], a[1]) lcm a[0] a 0 a[1] a 1 def gcd(a, b):
	while b != 0:
		r = a % b
		a = b
		b = r
	return a def gcd(a, b):
	while b != 0:
		r = a % b
		a = b
		b = r
	return a gcd a = list(map(int, input().split())) list(map(int, input().split())) a def lcm(a, b):
	return a // gcd(a, b) * b def lcm(a, b):
	return a // gcd(a, b) * b lcm
# AOJ 0005 GCD and LCM
# Python3 2018.6.9 bal4u

def lcm(a, b):
	return a // gcd(a, b) * b

def gcd(a, b):
	while b != 0:
		r = a % b
		a = b
		b = r
	return a

while True:
    try:
        a = list(map(int, input().split()))
        print(gcd(a[0], a[1]), lcm(a[0], a[1]))
    except EOFError:
        break
