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

def LCM(a,b):
    return a * b / GCD(a,b)

while True:
    try:
        a,b =map(int,raw_input().split())
        print GCD(a,b),LCM(a,b)
    except:
        break def GCD(a,b):
    while (a % b) != 0:
        a,b = b, a%b
    return b GCD while (a % b) != 0:
        a,b = b, a%b
     (a % b) != 0 a % b a b 0 a,b = b, a%b a b b a%b a b return b b a a b b def LCM(a,b):
    return a * b / GCD(a,b) LCM return a * b / GCD(a,b) a * b / GCD(a,b) a * b a b GCD(a,b) GCD a b a a b b while True:
    try:
        a,b =map(int,raw_input().split())
        print GCD(a,b),LCM(a,b)
    except:
        break True try:
        a,b =map(int,raw_input().split())
        print GCD(a,b),LCM(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 LCM(a,b) LCM a b def LCM(a,b):
    return a * b / GCD(a,b) def LCM(a,b):
    return a * b / GCD(a,b) LCM b =map(int,raw_input().split()) map(int,raw_input().split()) b a,b =map(int,raw_input().split()) map(int,raw_input().split()) a def GCD(a,b):
    while (a % b) != 0:
        a,b = b, a%b
    return b def GCD(a,b):
    while (a % b) != 0:
        a,b = b, a%b
    return b GCD
def GCD(a,b):
    while (a % b) != 0:
        a,b = b, a%b
    return b

def LCM(a,b):
    return a * b / GCD(a,b)

while True:
    try:
        a,b =map(int,raw_input().split())
        print GCD(a,b),LCM(a,b)
    except:
        break