import sys


def calc(i1, i2):

    a = i1
    b = i2
    if (i1 < i2):
        a = i2
        b = i1
    
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b

    gcd = b
    lcm = (i1 * i2) / gcd

    return gcd, lcm


for line in sys.stdin:
    datas =line.split()
    if (len(datas)):

        li = list(map(int, datas)) 
        a = li[0]
        b = li[1]

        x, y = calc(a, b)

        print("%d %d" % (x, y))

    else:
        break import sys sys def calc(i1, i2):

    a = i1
    b = i2
    if (i1 < i2):
        a = i2
        b = i1
    
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b

    gcd = b
    lcm = (i1 * i2) / gcd

    return gcd, lcm calc a = i1 a i1 b = i2 b i2 if (i1 < i2):
        a = i2
        b = i1
    
     i1 < i2 i1 i2 a = i2 a i2 b = i1 b i1 r = a % b r a % b a b while r != 0:
        a = b
        b = r
        r = a % b

     r != 0 r 0 a = b a b b = r b r r = a % b r a % b a b gcd = b gcd b lcm = (i1 * i2) / gcd lcm (i1 * i2) / gcd i1 * i2 i1 i2 gcd return gcd, lcm return gcd, lcm gcd lcm i1 i1 i2 i2 for line in sys.stdin:
    datas =line.split()
    if (len(datas)):

        li = list(map(int, datas)) 
        a = li[0]
        b = li[1]

        x, y = calc(a, b)

        print("%d %d" % (x, y))

    else:
        break line sys.stdin sys stdin datas =line.split() datas line.split() line.split line split if (len(datas)):

        li = list(map(int, datas)) 
        a = li[0]
        b = li[1]

        x, y = calc(a, b)

        print("%d %d" % (x, y))

    else:
        break len(datas) len datas li = list(map(int, datas)) li list(map(int, datas)) list map(int, datas) map int datas a = li[0] a li[0] li 0 b = li[1] b li[1] li 1 x, y = calc(a, b) x calc(a, b) calc a b y print("%d %d" % (x, y)) print "%d %d" % (x, y) "%d %d" (x, y) x y break li = list(map(int, datas)) list(map(int, datas)) li y = calc(a, b) calc(a, b) y datas =line.split() line.split() datas a = li[0] li[0] a x, y = calc(a, b) calc(a, b) x b = li[1] li[1] b def calc(i1, i2):

    a = i1
    b = i2
    if (i1 < i2):
        a = i2
        b = i1
    
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b

    gcd = b
    lcm = (i1 * i2) / gcd

    return gcd, lcm def calc(i1, i2):

    a = i1
    b = i2
    if (i1 < i2):
        a = i2
        b = i1
    
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b

    gcd = b
    lcm = (i1 * i2) / gcd

    return gcd, lcm calc
import sys


def calc(i1, i2):

    a = i1
    b = i2
    if (i1 < i2):
        a = i2
        b = i1
    
    r = a % b
    while r != 0:
        a = b
        b = r
        r = a % b

    gcd = b
    lcm = (i1 * i2) / gcd

    return gcd, lcm


for line in sys.stdin:
    datas =line.split()
    if (len(datas)):

        li = list(map(int, datas)) 
        a = li[0]
        b = li[1]

        x, y = calc(a, b)

        print("%d %d" % (x, y))

    else:
        break