import sys
from fractions import gcd
for line in sys.stdin:
    a, b = sorted(map(int, line.split()))
    print(gcd(a, b), (a * b) // gcd(a, b)) import sys sys from fractions import gcd for line in sys.stdin:
    a, b = sorted(map(int, line.split()))
    print(gcd(a, b), (a * b) // gcd(a, b)) line sys.stdin sys stdin a, b = sorted(map(int, line.split())) a sorted(map(int, line.split())) sorted map(int, line.split()) map int line.split() line.split line split b print(gcd(a, b), (a * b) // gcd(a, b)) print gcd(a, b) gcd a b (a * b) // gcd(a, b) a * b a b gcd(a, b) gcd a b b = sorted(map(int, line.split())) sorted(map(int, line.split())) b a, b = sorted(map(int, line.split())) sorted(map(int, line.split())) a
import sys
from fractions import gcd
for line in sys.stdin:
    a, b = sorted(map(int, line.split()))
    print(gcd(a, b), (a * b) // gcd(a, b))