import sys

while 1:
    line = sys.stdin.readline()
    if (not line):
        break
    x, y = map(int, line.split())
    if (x > y):
        gcd = x
        t = y
    else :
        gcd = y
        t = x
    while (t > 0) :
        tmp = gcd % t
        gcd = t
        t = tmp
    lcm = x * y / gcd
    print str(gcd) + " " + str(lcm) import sys sys while 1:
    line = sys.stdin.readline()
    if (not line):
        break
    x, y = map(int, line.split())
    if (x > y):
        gcd = x
        t = y
    else :
        gcd = y
        t = x
    while (t > 0) :
        tmp = gcd % t
        gcd = t
        t = tmp
    lcm = x * y / gcd
    print str(gcd) + " " + str(lcm) 1 line = sys.stdin.readline() line sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline if (not line):
        break
     not line line break x, y = map(int, line.split()) x map(int, line.split()) map int line.split() line.split line split y if (x > y):
        gcd = x
        t = y
    else :
        gcd = y
        t = x
     x > y x y gcd = x gcd x t = y t y gcd = y gcd y t = x t x while (t > 0) :
        tmp = gcd % t
        gcd = t
        t = tmp
     t > 0 t 0 tmp = gcd % t tmp gcd % t gcd t gcd = t gcd t t = tmp t tmp lcm = x * y / gcd lcm x * y / gcd x * y x y gcd print str(gcd) + " " + str(lcm) str(gcd) + " " str(gcd) str gcd " " str(lcm) str lcm gcd = x x gcd t = tmp tmp t y = map(int, line.split()) map(int, line.split()) y gcd = t t gcd lcm = x * y / gcd x * y / gcd lcm line = sys.stdin.readline() sys.stdin.readline() line x, y = map(int, line.split()) map(int, line.split()) x t = x x t t = y y t gcd = y y gcd tmp = gcd % t gcd % t tmp
import sys

while 1:
    line = sys.stdin.readline()
    if (not line):
        break
    x, y = map(int, line.split())
    if (x > y):
        gcd = x
        t = y
    else :
        gcd = y
        t = x
    while (t > 0) :
        tmp = gcd % t
        gcd = t
        t = tmp
    lcm = x * y / gcd
    print str(gcd) + " " + str(lcm)