import sys

def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

for ab in sys.stdin:
    a,b=map(int,ab.split(" "))
    if a<=b:
        tmp = a
        a = b
        b = tmp
    g = gcd(a,b)
    l = a*b/g
    print g,l 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 for ab in sys.stdin:
    a,b=map(int,ab.split(" "))
    if a<=b:
        tmp = a
        a = b
        b = tmp
    g = gcd(a,b)
    l = a*b/g
    print g,l ab sys.stdin sys stdin a,b=map(int,ab.split(" ")) a map(int,ab.split(" ")) map int ab.split(" ") ab.split ab split " " b if a<=b:
        tmp = a
        a = b
        b = tmp
     a<=b a b tmp = a tmp a a = b a b b = tmp b tmp g = gcd(a,b) g gcd(a,b) gcd a b l = a*b/g l a*b/g a*b a b g print g l b=map(int,ab.split(" ")) map(int,ab.split(" ")) b a = b b 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 a,b=map(int,ab.split(" ")) map(int,ab.split(" ")) a tmp = a a tmp g = gcd(a,b) gcd(a,b) g l = a*b/g a*b/g l b = tmp tmp b
import sys

def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

for ab in sys.stdin:
    a,b=map(int,ab.split(" "))
    if a<=b:
        tmp = a
        a = b
        b = tmp
    g = gcd(a,b)
    l = a*b/g
    print g,l