import sys

def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x

for line in sys.stdin:
    a, b = list(map(int, line.split()))
    print("{0} {1}".format(gcd(a, b), int((a * b) / gcd(a, b)))) import sys sys def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x gcd if x < y:
        x, y = y, x
     x < y x y x, y = y, x x y y x while y > 0:
        x, y = y, x % y
     y > 0 y 0 x, y = y, x % y x y y x % y x y return x x x x y y for line in sys.stdin:
    a, b = list(map(int, line.split()))
    print("{0} {1}".format(gcd(a, b), int((a * b) / gcd(a, b)))) line sys.stdin sys stdin a, b = list(map(int, line.split())) a list(map(int, line.split())) list map(int, line.split()) map int line.split() line.split line split b print("{0} {1}".format(gcd(a, b), int((a * b) / gcd(a, b)))) print "{0} {1}".format(gcd(a, b), int((a * b) / gcd(a, b))) "{0} {1}".format "{0} {1}" format gcd(a, b) gcd a b int((a * b) / gcd(a, b)) int (a * b) / gcd(a, b) a * b a b gcd(a, b) gcd a b def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x gcd b = list(map(int, line.split())) list(map(int, line.split())) b a, b = list(map(int, line.split())) list(map(int, line.split())) a
import sys

def gcd(x, y):
    if x < y:
        x, y = y, x
    while y > 0:
        x, y = y, x % y
    return x

for line in sys.stdin:
    a, b = list(map(int, line.split()))
    print("{0} {1}".format(gcd(a, b), int((a * b) / gcd(a, b))))