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