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

while True:
    try:
        a, b = list(map(float, input().split()))
    except EOFError:
        break
    if a >= b:
        a, b = b, a
    gcd = GCD(a, b) if b%a != 0 else a
    print("{0} {1}".format(int(gcd), int(a*b/gcd))) def GCD(a, b):
    b %= a
    return b if a%b == 0 else GCD(b, a)
         GCD b %= a b a return b if a%b == 0 else GCD(b, a) b if a%b == 0 else GCD(b, a) a%b == 0 a%b a b 0 b GCD(b, a) GCD b a a a b b while True:
    try:
        a, b = list(map(float, input().split()))
    except EOFError:
        break
    if a >= b:
        a, b = b, a
    gcd = GCD(a, b) if b%a != 0 else a
    print("{0} {1}".format(int(gcd), int(a*b/gcd))) True try:
        a, b = list(map(float, input().split()))
    except EOFError:
        break
     except EOFError:
        break
     break a, b = list(map(float, input().split())) a list(map(float, input().split())) list map(float, input().split()) map float input().split() ().split () input split b if a >= b:
        a, b = b, a
     a >= b a b a, b = b, a a b b a gcd = GCD(a, b) if b%a != 0 else a gcd GCD(a, b) if b%a != 0 else a b%a != 0 b%a b a 0 GCD(a, b) GCD a b a print("{0} {1}".format(int(gcd), int(a*b/gcd))) print "{0} {1}".format(int(gcd), int(a*b/gcd)) "{0} {1}".format "{0} {1}" format int(gcd) int gcd int(a*b/gcd) int a*b/gcd a*b a b gcd b = list(map(float, input().split())) list(map(float, input().split())) b def GCD(a, b):
    b %= a
    return b if a%b == 0 else GCD(b, a)
         def GCD(a, b):
    b %= a
    return b if a%b == 0 else GCD(b, a)
         GCD a, b = list(map(float, input().split())) list(map(float, input().split())) a a, b = b, a b a b = b, a a b gcd = GCD(a, b) if b%a != 0 else a GCD(a, b) if b%a != 0 else a gcd
def GCD(a, b):
    b %= a
    return b if a%b == 0 else GCD(b, a)
        

while True:
    try:
        a, b = list(map(float, input().split()))
    except EOFError:
        break
    if a >= b:
        a, b = b, a
    gcd = GCD(a, b) if b%a != 0 else a
    print("{0} {1}".format(int(gcd), int(a*b/gcd)))