import math
import sys
def gcd(a,b):
    if b==0:
        return a
    return gcd(b, a%b)
def lcm(a,b):
    return a/gcd(a,b)*b
for l in sys.stdin:
    a=list(map(int,l.split()))
    print("%d %d"%(gcd(a[0],a[1]),lcm(a[0],a[1]))) import math math import sys sys def gcd(a,b):
    if b==0:
        return a
    return gcd(b, a%b) gcd if b==0:
        return a
     b==0 b 0 return a a return gcd(b, a%b) gcd(b, a%b) gcd b a%b a b a a b b def lcm(a,b):
    return a/gcd(a,b)*b lcm return a/gcd(a,b)*b a/gcd(a,b)*b a/gcd(a,b) a gcd(a,b) gcd a b b a a b b for l in sys.stdin:
    a=list(map(int,l.split()))
    print("%d %d"%(gcd(a[0],a[1]),lcm(a[0],a[1]))) l sys.stdin sys stdin a=list(map(int,l.split())) a list(map(int,l.split())) list map(int,l.split()) map int l.split() l.split l split print("%d %d"%(gcd(a[0],a[1]),lcm(a[0],a[1]))) print "%d %d"%(gcd(a[0],a[1]),lcm(a[0],a[1])) "%d %d" (gcd(a[0],a[1]),lcm(a[0],a[1])) gcd(a[0],a[1]) gcd a[0] a 0 a[1] a 1 lcm(a[0],a[1]) lcm a[0] a 0 a[1] a 1 a=list(map(int,l.split())) list(map(int,l.split())) a def gcd(a,b):
    if b==0:
        return a
    return gcd(b, a%b) def gcd(a,b):
    if b==0:
        return a
    return gcd(b, a%b) gcd def lcm(a,b):
    return a/gcd(a,b)*b def lcm(a,b):
    return a/gcd(a,b)*b lcm
import math
import sys
def gcd(a,b):
    if b==0:
        return a
    return gcd(b, a%b)
def lcm(a,b):
    return a/gcd(a,b)*b
for l in sys.stdin:
    a=list(map(int,l.split()))
    print("%d %d"%(gcd(a[0],a[1]),lcm(a[0],a[1])))
