import sys

def gcd(a, b):
    if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r)

def calc(a, b):
    gcd_val = gcd(a, b)
    lcm_val = a * b / gcd_val
    return (gcd_val, lcm_val)


for line in sys.stdin.readlines():
    line = line.strip()
    a, b = map(int, line.split())
    print "{0[0]:d} {0[1]:d}".format(calc(a, b)) import sys sys def gcd(a, b):
    if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r) gcd if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r) b == 0 b 0 return a a r = a % b r a % b a b return gcd(b, r) gcd(b, r) gcd b r a a b b def calc(a, b):
    gcd_val = gcd(a, b)
    lcm_val = a * b / gcd_val
    return (gcd_val, lcm_val) calc gcd_val = gcd(a, b) gcd_val gcd(a, b) gcd a b lcm_val = a * b / gcd_val lcm_val a * b / gcd_val a * b a b gcd_val return (gcd_val, lcm_val) (gcd_val, lcm_val) gcd_val lcm_val a a b b for line in sys.stdin.readlines():
    line = line.strip()
    a, b = map(int, line.split())
    print "{0[0]:d} {0[1]:d}".format(calc(a, b)) line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines line = line.strip() line line.strip() line.strip line strip a, b = map(int, line.split()) a map(int, line.split()) map int line.split() line.split line split b print "{0[0]:d} {0[1]:d}".format(calc(a, b)) "{0[0]:d} {0[1]:d}".format "{0[0]:d} {0[1]:d}" format calc(a, b) calc a b a, b = map(int, line.split()) map(int, line.split()) a def calc(a, b):
    gcd_val = gcd(a, b)
    lcm_val = a * b / gcd_val
    return (gcd_val, lcm_val) def calc(a, b):
    gcd_val = gcd(a, b)
    lcm_val = a * b / gcd_val
    return (gcd_val, lcm_val) calc b = map(int, line.split()) map(int, line.split()) b line = line.strip() line.strip() line def gcd(a, b):
    if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r) def gcd(a, b):
    if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r) gcd
import sys

def gcd(a, b):
    if b == 0:
        return a
    else:
        r = a % b
        return gcd(b, r)

def calc(a, b):
    gcd_val = gcd(a, b)
    lcm_val = a * b / gcd_val
    return (gcd_val, lcm_val)


for line in sys.stdin.readlines():
    line = line.strip()
    a, b = map(int, line.split())
    print "{0[0]:d} {0[1]:d}".format(calc(a, b))