import sys

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

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

for s in sys.stdin:
    a, b = map(int, s.split())
    print "%d %d"%(gcd(a, b), lcm(a, b)) import sys sys def gcd(a, b):
    while b:
        a, b = b, a % b
    return a 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 for s in sys.stdin:
    a, b = map(int, s.split())
    print "%d %d"%(gcd(a, b), lcm(a, b)) s sys.stdin sys stdin a, b = map(int, s.split()) a map(int, s.split()) map int s.split() s.split s split b print "%d %d"%(gcd(a, b), lcm(a, b)) "%d %d" (gcd(a, b), lcm(a, b)) gcd(a, b) gcd a b lcm(a, b) lcm a b def gcd(a, b):
    while b:
        a, b = b, a % b
    return a def gcd(a, b):
    while b:
        a, b = b, a % b
    return a gcd a, b = map(int, s.split()) map(int, s.split()) a def lcm(a, b):
    return a * b / gcd(a, b) def lcm(a, b):
    return a * b / gcd(a, b) lcm b = map(int, s.split()) map(int, s.split()) b
import sys

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

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

for s in sys.stdin:
    a, b = map(int, s.split())
    print "%d %d"%(gcd(a, b), lcm(a, b))