import sys

# 最大公約数(greatest common divisor)を求める関数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# 最小公倍数(least common multiple)を求める関数
# //は切り捨て除算
def lcm(a, b):
    return a * b // gcd(a, b)

lines = sys.stdin.readlines()
for line in lines:
    a = list(map(int, line.split(" ")))
    print(gcd(a[0], a[1]), lcm(a[0], a[1]))
 import sys sys def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# 最小公倍数(least common multiple)を求める関数
# //は切り捨て除算 gcd while b:
        a, b = b, a % b
     b a, b = b, a % b a b b a % b a b return a a a a b b def lcm(a, b):
    return a * b // gcd(a, b) lcm return a * b // gcd(a, b) a * b // gcd(a, b) a * b a b gcd(a, b) gcd a b a a b b lines = sys.stdin.readlines() lines sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines for line in lines:
    a = list(map(int, line.split(" ")))
    print(gcd(a[0], a[1]), lcm(a[0], a[1])) line lines a = list(map(int, line.split(" "))) a list(map(int, line.split(" "))) list map(int, line.split(" ")) map int line.split(" ") line.split line 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 a = list(map(int, line.split(" "))) list(map(int, line.split(" "))) a lines = sys.stdin.readlines() sys.stdin.readlines() lines def lcm(a, b):
    return a * b // gcd(a, b) def lcm(a, b):
    return a * b // gcd(a, b) lcm def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# 最小公倍数(least common multiple)を求める関数
# //は切り捨て除算 def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# 最小公倍数(least common multiple)を求める関数
# //は切り捨て除算 gcd
import sys

# 最大公約数(greatest common divisor)を求める関数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# 最小公倍数(least common multiple)を求める関数
# //は切り捨て除算
def lcm(a, b):
    return a * b // gcd(a, b)

lines = sys.stdin.readlines()
for line in lines:
    a = list(map(int, line.split(" ")))
    print(gcd(a[0], a[1]), lcm(a[0], a[1]))

