import sys

def gcd(x, y):
    if x % y != 0:
        return gcd(y, x % y)
    return y

for i in sys.stdin:
    x, y = map(int, i.split())
    g = gcd(x,y)
    print(g, int(x*y/g)) import sys sys def gcd(x, y):
    if x % y != 0:
        return gcd(y, x % y)
    return y gcd if x % y != 0:
        return gcd(y, x % y)
     x % y != 0 x % y x y 0 return gcd(y, x % y) gcd(y, x % y) gcd y x % y x y return y y x x y y for i in sys.stdin:
    x, y = map(int, i.split())
    g = gcd(x,y)
    print(g, int(x*y/g)) i sys.stdin sys stdin x, y = map(int, i.split()) x map(int, i.split()) map int i.split() i.split i split y g = gcd(x,y) g gcd(x,y) gcd x y print(g, int(x*y/g)) print g int(x*y/g) int x*y/g x*y x y g x, y = map(int, i.split()) map(int, i.split()) x g = gcd(x,y) gcd(x,y) g def gcd(x, y):
    if x % y != 0:
        return gcd(y, x % y)
    return y def gcd(x, y):
    if x % y != 0:
        return gcd(y, x % y)
    return y gcd y = map(int, i.split()) map(int, i.split()) y
import sys

def gcd(x, y):
    if x % y != 0:
        return gcd(y, x % y)
    return y

for i in sys.stdin:
    x, y = map(int, i.split())
    g = gcd(x,y)
    print(g, int(x*y/g))