import sys
def gcd(a,b):
    if a==b:
        return a
    while(b>0):
        a,b = b,a%b
        if b==0:
            return a
def lcm(a,b):
    n=1
    m=1
    while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
    return n*a
lines = sys.stdin.readlines()
for line in lines:
    line = line.split(" ")
    inp = []
    for i in line:
        inp.append(int(i))
    inp.sort()
    a = inp[0]
    b = inp[1]
    print("%d %d" % (gcd(a,b),lcm(a,b))) import sys sys def gcd(a,b):
    if a==b:
        return a
    while(b>0):
        a,b = b,a%b
        if b==0:
            return a gcd if a==b:
        return a
     a==b a b return a a while(b>0):
        a,b = b,a%b
        if b==0:
            return a b>0 b 0 a,b = b,a%b a b b a%b a b if b==0:
            return a b==0 b 0 return a a a a b b def lcm(a,b):
    n=1
    m=1
    while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
    return n*a lcm n=1 n 1 m=1 m 1 while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
     n*a!=m*b n*a n a m*b m b if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
     n*a>m*b n*a n a m*b m b m+=1 m 1 elif n*a<m*b:
            n+=1
     n*a<m*b n*a n a m*b m b n+=1 n 1 return n*a n*a n a a a b b lines = sys.stdin.readlines() lines sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines for line in lines:
    line = line.split(" ")
    inp = []
    for i in line:
        inp.append(int(i))
    inp.sort()
    a = inp[0]
    b = inp[1]
    print("%d %d" % (gcd(a,b),lcm(a,b))) line lines line = line.split(" ") line line.split(" ") line.split line split " " inp = [] inp [] for i in line:
        inp.append(int(i))
     i line inp.append(int(i)) inp.append inp append int(i) int i inp.sort() inp.sort inp sort a = inp[0] a inp[0] inp 0 b = inp[1] b inp[1] inp 1 print("%d %d" % (gcd(a,b),lcm(a,b))) print "%d %d" % (gcd(a,b),lcm(a,b)) "%d %d" (gcd(a,b),lcm(a,b)) gcd(a,b) gcd a b lcm(a,b) lcm a b def lcm(a,b):
    n=1
    m=1
    while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
    return n*a def lcm(a,b):
    n=1
    m=1
    while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
    return n*a lcm lines = sys.stdin.readlines() sys.stdin.readlines() lines def gcd(a,b):
    if a==b:
        return a
    while(b>0):
        a,b = b,a%b
        if b==0:
            return a def gcd(a,b):
    if a==b:
        return a
    while(b>0):
        a,b = b,a%b
        if b==0:
            return a gcd b = inp[1] inp[1] b a = inp[0] inp[0] a inp = [] [] inp line = line.split(" ") line.split(" ") line
import sys
def gcd(a,b):
    if a==b:
        return a
    while(b>0):
        a,b = b,a%b
        if b==0:
            return a
def lcm(a,b):
    n=1
    m=1
    while(n*a!=m*b):
        if n*a>m*b:
            m+=1
        elif n*a<m*b:
            n+=1
    return n*a
lines = sys.stdin.readlines()
for line in lines:
    line = line.split(" ")
    inp = []
    for i in line:
        inp.append(int(i))
    inp.sort()
    a = inp[0]
    b = inp[1]
    print("%d %d" % (gcd(a,b),lcm(a,b)))