import fractions

while True:
    try:
        (a, b) = map(int, raw_input().split())
        c = fractions.gcd(a, b)
        print c, ((a*b)/c)
    except EOFError:
        break import fractions fractions while True:
    try:
        (a, b) = map(int, raw_input().split())
        c = fractions.gcd(a, b)
        print c, ((a*b)/c)
    except EOFError:
        break True try:
        (a, b) = map(int, raw_input().split())
        c = fractions.gcd(a, b)
        print c, ((a*b)/c)
    except EOFError:
        break except EOFError:
        break break (a, b) = map(int, raw_input().split()) (a, b) a b map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split c = fractions.gcd(a, b) c fractions.gcd(a, b) fractions.gcd fractions gcd a b print c (a*b)/c a*b a b c c = fractions.gcd(a, b) fractions.gcd(a, b) c
import fractions

while True:
    try:
        (a, b) = map(int, raw_input().split())
        c = fractions.gcd(a, b)
        print c, ((a*b)/c)
    except EOFError:
        break