import sys

def gcd(m,n):
    if n==0: return m
    return gcd(n,m%n)

for l in sys.stdin:
    a,b=map(int,l.split())
    d=gcd(a,b)
    print d,a/d*b import sys sys def gcd(m,n):
    if n==0: return m
    return gcd(n,m%n) gcd if n==0: return m
     n==0 n 0 return gcd(n,m%n) gcd(n,m%n) gcd n m%n m n m m n n for l in sys.stdin:
    a,b=map(int,l.split())
    d=gcd(a,b)
    print d,a/d*b l sys.stdin sys stdin a,b=map(int,l.split()) a map(int,l.split()) map int l.split() l.split l split b d=gcd(a,b) d gcd(a,b) gcd a b print d a/d*b a/d a d b b=map(int,l.split()) map(int,l.split()) b a,b=map(int,l.split()) map(int,l.split()) a def gcd(m,n):
    if n==0: return m
    return gcd(n,m%n) def gcd(m,n):
    if n==0: return m
    return gcd(n,m%n) gcd d=gcd(a,b) gcd(a,b) d
import sys

def gcd(m,n):
    if n==0: return m
    return gcd(n,m%n)

for l in sys.stdin:
    a,b=map(int,l.split())
    d=gcd(a,b)
    print d,a/d*b