import sys

def readint():
    for line in sys.stdin:
        yield map(int,line.split())

def gcd(x,y):
    [x,y] = [max(x,y),min(x,y)]
    while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
    return y

for [x,y] in readint():
    GCD = gcd(x,y)
    mx = x/GCD
    print GCD,mx*y import sys sys def readint():
    for line in sys.stdin:
        yield map(int,line.split()) readint for line in sys.stdin:
        yield map(int,line.split()) line sys.stdin sys stdin yield map(int,line.split()) map(int,line.split()) map int line.split() line.split line split def gcd(x,y):
    [x,y] = [max(x,y),min(x,y)]
    while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
    return y gcd [x,y] = [max(x,y),min(x,y)] [x,y] x y [max(x,y),min(x,y)] max(x,y) max x y min(x,y) min x y while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
     1 z = x % y z x % y x y if z == 0:
            break
         z == 0 z 0 break [x,y] = [y,z] [x,y] x y [y,z] y z return y y x x y y for [x,y] in readint():
    GCD = gcd(x,y)
    mx = x/GCD
    print GCD,mx*y [x,y] x y readint() readint GCD = gcd(x,y) GCD gcd(x,y) gcd x y mx = x/GCD mx x/GCD x GCD print GCD mx*y mx y GCD = gcd(x,y) gcd(x,y) GCD mx = x/GCD x/GCD mx def gcd(x,y):
    [x,y] = [max(x,y),min(x,y)]
    while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
    return y def gcd(x,y):
    [x,y] = [max(x,y),min(x,y)]
    while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
    return y gcd def readint():
    for line in sys.stdin:
        yield map(int,line.split()) def readint():
    for line in sys.stdin:
        yield map(int,line.split()) readint
import sys

def readint():
    for line in sys.stdin:
        yield map(int,line.split())

def gcd(x,y):
    [x,y] = [max(x,y),min(x,y)]
    while 1:
        z = x % y
        if z == 0:
            break
        [x,y] = [y,z]
    return y

for [x,y] in readint():
    GCD = gcd(x,y)
    mx = x/GCD
    print GCD,mx*y