from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
import sys
from fractions import gcd

for line in sys.stdin:
    small, large = sorted(int(n) for n in line .split())
    G = gcd(large, small)
    print(G, large // G * small) from __future__ import (division, absolute_import, print_function,
                        unicode_literals) import sys sys from fractions import gcd for line in sys.stdin:
    small, large = sorted(int(n) for n in line .split())
    G = gcd(large, small)
    print(G, large // G * small) line sys.stdin sys stdin small, large = sorted(int(n) for n in line .split()) small sorted(int(n) for n in line .split()) sorted int(n) int n large G = gcd(large, small) G gcd(large, small) gcd large small print(G, large // G * small) print G large // G * small large // G large G small large = sorted(int(n) for n in line .split()) sorted(int(n) for n in line .split()) large small, large = sorted(int(n) for n in line .split()) sorted(int(n) for n in line .split()) small G = gcd(large, small) gcd(large, small) G
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
import sys
from fractions import gcd

for line in sys.stdin:
    small, large = sorted(int(n) for n in line .split())
    G = gcd(large, small)
    print(G, large // G * small)