def gcd(aa, bb):
    if aa % bb == 0:
        return bb
    return gcd(bb, aa % bb)

import sys
for line in sys.stdin.readlines():
    ab = list(map(int, line.split()))
    a = max(ab)
    b = min(ab)
    g = gcd(a, b)

    print(g, a * b // g) def gcd(aa, bb):
    if aa % bb == 0:
        return bb
    return gcd(bb, aa % bb) gcd if aa % bb == 0:
        return bb
     aa % bb == 0 aa % bb aa bb 0 return bb bb return gcd(bb, aa % bb) gcd(bb, aa % bb) gcd bb aa % bb aa bb aa aa bb bb import sys sys for line in sys.stdin.readlines():
    ab = list(map(int, line.split()))
    a = max(ab)
    b = min(ab)
    g = gcd(a, b)

    print(g, a * b // g) line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines ab = list(map(int, line.split())) ab list(map(int, line.split())) list map(int, line.split()) map int line.split() line.split line split a = max(ab) a max(ab) max ab b = min(ab) b min(ab) min ab g = gcd(a, b) g gcd(a, b) gcd a b print(g, a * b // g) print g a * b // g a * b a b g a = max(ab) max(ab) a b = min(ab) min(ab) b ab = list(map(int, line.split())) list(map(int, line.split())) ab g = gcd(a, b) gcd(a, b) g def gcd(aa, bb):
    if aa % bb == 0:
        return bb
    return gcd(bb, aa % bb) def gcd(aa, bb):
    if aa % bb == 0:
        return bb
    return gcd(bb, aa % bb) gcd
def gcd(aa, bb):
    if aa % bb == 0:
        return bb
    return gcd(bb, aa % bb)

import sys
for line in sys.stdin.readlines():
    ab = list(map(int, line.split()))
    a = max(ab)
    b = min(ab)
    g = gcd(a, b)

    print(g, a * b // g)
