
import sys
from fractions import gcd
[print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]] import sys sys from fractions import gcd print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]] for i in sys.stdin for k in [[int(j) for j in i.split()]] i sys.stdin sys stdin for k in [[int(j) for j in i.split()]] k [[int(j) for j in i.split()]] [int(j) for j in i.split()] for k in [[int(j) for j in i.split()]] print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) print "{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1])) "{} {}".format "{} {}" format gcd(k[0], k[1]) gcd k[0] k 0 k[1] k 1 (k[0] * k[1]) // gcd(k[0], k[1]) k[0] * k[1] k[0] k 0 k[1] k 1 gcd(k[0], k[1]) gcd k[0] k 0 k[1] k 1 [print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]]

import sys
from fractions import gcd
[print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]]