#! /usr/lib/python3
import fractions
while True:
    try:
        a, b=map(int, input().split())
        s=fractions.gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break import fractions fractions while True:
    try:
        a, b=map(int, input().split())
        s=fractions.gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break True try:
        a, b=map(int, input().split())
        s=fractions.gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break except:
        break break a, b=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b s=fractions.gcd(a,b) s fractions.gcd(a,b) fractions.gcd fractions gcd a b print("{0} {1:.0f}".format(s,a*b/s)) print "{0} {1:.0f}".format(s,a*b/s) "{0} {1:.0f}".format "{0} {1:.0f}" format s a*b/s a*b a b s b=map(int, input().split()) map(int, input().split()) b a, b=map(int, input().split()) map(int, input().split()) a s=fractions.gcd(a,b) fractions.gcd(a,b) s
#! /usr/lib/python3
import fractions
while True:
    try:
        a, b=map(int, input().split())
        s=fractions.gcd(a,b)
        print("{0} {1:.0f}".format(s,a*b/s))
    except:
        break