def gcd(a,b):
    while b != 0:
        a, b = b, a % b
    return a

while True:
    try:
        a, b = map(int, raw_input().split())
        print gcd(a, b), a*b/ gcd(a,b)
    except:
        break def gcd(a,b):
    while b != 0:
        a, b = b, a % b
    return a gcd while b != 0:
        a, b = b, a % b
     b != 0 b 0 a, b = b, a % b a b b a % b a b return a a a a b b while True:
    try:
        a, b = map(int, raw_input().split())
        print gcd(a, b), a*b/ gcd(a,b)
    except:
        break True try:
        a, b = map(int, raw_input().split())
        print gcd(a, b), a*b/ gcd(a,b)
    except:
        break except:
        break break a, b = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b print gcd(a, b) gcd a b a*b/ gcd(a,b) a*b a b gcd(a,b) gcd a b a, b = map(int, raw_input().split()) map(int, raw_input().split()) a def gcd(a,b):
    while b != 0:
        a, b = b, a % b
    return a def gcd(a,b):
    while b != 0:
        a, b = b, a % b
    return a gcd b = map(int, raw_input().split()) map(int, raw_input().split()) b
def gcd(a,b):
    while b != 0:
        a, b = b, a % b
    return a

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