import sys

for line in sys.stdin:
    n = [int(i) for i in line.replace("\n", "").split(" ")]
    n.sort()
    low = n[0]
    hi = n[1]
    while hi % low:
        hi, low = low, hi % low
    print("%d %d" % (low, n[0] / low * n[1])) import sys sys for line in sys.stdin:
    n = [int(i) for i in line.replace("\n", "").split(" ")]
    n.sort()
    low = n[0]
    hi = n[1]
    while hi % low:
        hi, low = low, hi % low
    print("%d %d" % (low, n[0] / low * n[1])) line sys.stdin sys stdin int(i) for i in line.replace("\n", "").split(" ") for i in line.replace("\n", "").split(" ") i line.replace("\n", "").split(" ") line.replace("\n", "").split line.replace("\n", "") line.replace line replace "\n" "" split " " for i in line.replace("\n", "").split(" ") int(i) int i n = [int(i) for i in line.replace("\n", "").split(" ")] n [int(i) for i in line.replace("\n", "").split(" ")] n.sort() n.sort n sort low = n[0] low n[0] n 0 hi = n[1] hi n[1] n 1 while hi % low:
        hi, low = low, hi % low
     hi % low hi low hi, low = low, hi % low hi low low hi % low hi low print("%d %d" % (low, n[0] / low * n[1])) print "%d %d" % (low, n[0] / low * n[1]) "%d %d" (low, n[0] / low * n[1]) low n[0] / low * n[1] n[0] / low n[0] n 0 low n[1] n 1 low = n[0] n[0] low hi = n[1] n[1] hi n = [int(i) for i in line.replace("\n", "").split(" ")] [int(i) for i in line.replace("\n", "").split(" ")] n hi, low = low, hi % low low hi low = low, hi % low hi % low low
import sys

for line in sys.stdin:
    n = [int(i) for i in line.replace("\n", "").split(" ")]
    n.sort()
    low = n[0]
    hi = n[1]
    while hi % low:
        hi, low = low, hi % low
    print("%d %d" % (low, n[0] / low * n[1]))