import sys

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

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

for line in sys.stdin:
    a,b = sorted(map(int, line.rstrip().split(' ')))
    print("{} {}".format(gcd(a,b),lcm(a,b))) import sys sys def gcd(a,b):
    r= b % a
    while r != 0:
        a,b = r,a
        r = b % a
    return a gcd r= b % a r b % a b a while r != 0:
        a,b = r,a
        r = b % a
     r != 0 r 0 a,b = r,a a r b a r = b % a r b % a b a return a a a a b b def lcm(a,b):
    return int(a*b/gcd(a,b)) lcm return int(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 a a b b for line in sys.stdin:
    a,b = sorted(map(int, line.rstrip().split(' ')))
    print("{} {}".format(gcd(a,b),lcm(a,b))) line sys.stdin sys stdin a,b = sorted(map(int, line.rstrip().split(' '))) a sorted(map(int, line.rstrip().split(' '))) sorted map(int, line.rstrip().split(' ')) map int line.rstrip().split(' ') line.rstrip().split line.rstrip() line.rstrip line rstrip split ' ' b print("{} {}".format(gcd(a,b),lcm(a,b))) print "{} {}".format(gcd(a,b),lcm(a,b)) "{} {}".format "{} {}" format gcd(a,b) gcd a b lcm(a,b) lcm a b def lcm(a,b):
    return int(a*b/gcd(a,b)) def lcm(a,b):
    return int(a*b/gcd(a,b)) lcm def gcd(a,b):
    r= b % a
    while r != 0:
        a,b = r,a
        r = b % a
    return a def gcd(a,b):
    r= b % a
    while r != 0:
        a,b = r,a
        r = b % a
    return a gcd a,b = sorted(map(int, line.rstrip().split(' '))) sorted(map(int, line.rstrip().split(' '))) a b = sorted(map(int, line.rstrip().split(' '))) sorted(map(int, line.rstrip().split(' '))) b
import sys

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

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

for line in sys.stdin:
    a,b = sorted(map(int, line.rstrip().split(' ')))
    print("{} {}".format(gcd(a,b),lcm(a,b)))