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

while True :
    try :
        a, b = map(int, input().split())
    except EOFError :
        break
    
    a, b = max(a, b), min(a, b)
    x = gcd(a, b)
    print(x, a * b // x) def gcd(a, b) :
    if a % b == 0 :
        return b
    else :
        return gcd(b, a % b) gcd if a % b == 0 :
        return b
    else :
        return gcd(b, a % b) a % b == 0 a % b a b 0 return b b return gcd(b, a % b) gcd(b, a % b) gcd b a % b a b a a b b while True :
    try :
        a, b = map(int, input().split())
    except EOFError :
        break
    
    a, b = max(a, b), min(a, b)
    x = gcd(a, b)
    print(x, a * b // x) True try :
        a, b = map(int, input().split())
    except EOFError :
        break
    
     except EOFError :
        break
    
     break a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b a, b = max(a, b), min(a, b) a max(a, b) max a b b min(a, b) min a b x = gcd(a, b) x gcd(a, b) gcd a b print(x, a * b // x) print x a * b // x a * b a b x b = max(a, b), min(a, b) min(a, b) b def gcd(a, b) :
    if a % b == 0 :
        return b
    else :
        return gcd(b, a % b) def gcd(a, b) :
    if a % b == 0 :
        return b
    else :
        return gcd(b, a % b) gcd a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b x = gcd(a, b) gcd(a, b) x a, b = max(a, b), min(a, b) max(a, b) a
def gcd(a, b) :
    if a % b == 0 :
        return b
    else :
        return gcd(b, a % b)

while True :
    try :
        a, b = map(int, input().split())
    except EOFError :
        break
    
    a, b = max(a, b), min(a, b)
    x = gcd(a, b)
    print(x, a * b // x)
