def GCD(a,b):
    if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
        
while True:
    try:
        data = map(int, raw_input().split())
    except:
        break
    if data[0] > data[1]:
        a = data[0]
        b = data[1]
    else:
        a = data[1]
        b = data[0]
    x = GCD(a, b)
    y = a*b / x
    
    print x, y def GCD(a,b):
    if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
         GCD if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
         b == 0 b 0 return a a r = a % b r a % b a b return GCD(b, r) GCD(b, r) GCD b r a a b b while True:
    try:
        data = map(int, raw_input().split())
    except:
        break
    if data[0] > data[1]:
        a = data[0]
        b = data[1]
    else:
        a = data[1]
        b = data[0]
    x = GCD(a, b)
    y = a*b / x
    
    print x, y True try:
        data = map(int, raw_input().split())
    except:
        break
     except:
        break
     break data = map(int, raw_input().split()) data map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if data[0] > data[1]:
        a = data[0]
        b = data[1]
    else:
        a = data[1]
        b = data[0]
     data[0] > data[1] data[0] data 0 data[1] data 1 a = data[0] a data[0] data 0 b = data[1] b data[1] data 1 a = data[1] a data[1] data 1 b = data[0] b data[0] data 0 x = GCD(a, b) x GCD(a, b) GCD a b y = a*b / x y a*b / x a*b a b x print x y data = map(int, raw_input().split()) map(int, raw_input().split()) data x = GCD(a, b) GCD(a, b) x a = data[0] data[0] a b = data[0] data[0] b def GCD(a,b):
    if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
         def GCD(a,b):
    if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
         GCD y = a*b / x a*b / x y b = data[1] data[1] b a = data[1] data[1] a
def GCD(a,b):
    if b == 0:
        return a
    else:
        r = a % b
        return GCD(b, r)
        
while True:
    try:
        data = map(int, raw_input().split())
    except:
        break
    if data[0] > data[1]:
        a = data[0]
        b = data[1]
    else:
        a = data[1]
        b = data[0]
    x = GCD(a, b)
    y = a*b / x
    
    print x, y