import sys
for i in sys.stdin:
    a, b = map(int, i.split())
    p, q = max(a, b), min(a, b)
    while True:
        if p % q == 0:
            break
        else:
            p, q = q, p % q
    print("{} {}".format(q, int(a * b / q))) import sys sys for i in sys.stdin:
    a, b = map(int, i.split())
    p, q = max(a, b), min(a, b)
    while True:
        if p % q == 0:
            break
        else:
            p, q = q, p % q
    print("{} {}".format(q, int(a * b / q))) i sys.stdin sys stdin a, b = map(int, i.split()) a map(int, i.split()) map int i.split() i.split i split b p, q = max(a, b), min(a, b) p max(a, b) max a b q min(a, b) min a b while True:
        if p % q == 0:
            break
        else:
            p, q = q, p % q
     True if p % q == 0:
            break
        else:
            p, q = q, p % q
     p % q == 0 p % q p q 0 break p, q = q, p % q p q q p % q p q print("{} {}".format(q, int(a * b / q))) print "{} {}".format(q, int(a * b / q)) "{} {}".format "{} {}" format q int(a * b / q) int a * b / q a * b a b q p, q = max(a, b), min(a, b) max(a, b) p a, b = map(int, i.split()) map(int, i.split()) a q = q, p % q p % q q b = map(int, i.split()) map(int, i.split()) b p, q = q, p % q q p q = max(a, b), min(a, b) min(a, b) q
import sys
for i in sys.stdin:
    a, b = map(int, i.split())
    p, q = max(a, b), min(a, b)
    while True:
        if p % q == 0:
            break
        else:
            p, q = q, p % q
    print("{} {}".format(q, int(a * b / q)))
