import sys
import fractions

lines = []
for line in sys.stdin:
    num = line.split(" ")
    a, b = int(num[0]), int(num[1])
    gcd = fractions.gcd(a, b)
    print("{0} {1:.0f}".format(gcd, (a*b)/gcd)) import sys sys import fractions fractions lines = [] lines [] for line in sys.stdin:
    num = line.split(" ")
    a, b = int(num[0]), int(num[1])
    gcd = fractions.gcd(a, b)
    print("{0} {1:.0f}".format(gcd, (a*b)/gcd)) line sys.stdin sys stdin num = line.split(" ") num line.split(" ") line.split line split " " a, b = int(num[0]), int(num[1]) a int(num[0]) int num[0] num 0 b int(num[1]) int num[1] num 1 gcd = fractions.gcd(a, b) gcd fractions.gcd(a, b) fractions.gcd fractions gcd a b print("{0} {1:.0f}".format(gcd, (a*b)/gcd)) print "{0} {1:.0f}".format(gcd, (a*b)/gcd) "{0} {1:.0f}".format "{0} {1:.0f}" format gcd (a*b)/gcd a*b a b gcd num = line.split(" ") line.split(" ") num a, b = int(num[0]), int(num[1]) int(num[0]) a lines = [] [] lines gcd = fractions.gcd(a, b) fractions.gcd(a, b) gcd b = int(num[0]), int(num[1]) int(num[1]) b
import sys
import fractions

lines = []
for line in sys.stdin:
    num = line.split(" ")
    a, b = int(num[0]), int(num[1])
    gcd = fractions.gcd(a, b)
    print("{0} {1:.0f}".format(gcd, (a*b)/gcd))