import sys

def gcd(x,y):
    if(y>0):
        return gcd(y,x%y)
    else:
        return x

def lcm(x,y):
    return x/gcd(x,y)*y

for x in sys.stdin.readlines():
    n = [float(y) for y in x.split()]

    print "%d %d" % (gcd(n[0], n[1]),(lcm(n[0], n[1]))) import sys sys def gcd(x,y):
    if(y>0):
        return gcd(y,x%y)
    else:
        return x gcd if(y>0):
        return gcd(y,x%y)
    else:
        return x y>0 y 0 return gcd(y,x%y) gcd(y,x%y) gcd y x%y x y return x x x x y y def lcm(x,y):
    return x/gcd(x,y)*y lcm return x/gcd(x,y)*y x/gcd(x,y)*y x/gcd(x,y) x gcd(x,y) gcd x y y x x y y for x in sys.stdin.readlines():
    n = [float(y) for y in x.split()]

    print "%d %d" % (gcd(n[0], n[1]),(lcm(n[0], n[1]))) x sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines float(y) for y in x.split() for y in x.split() y x.split() x.split x split for y in x.split() float(y) float y n = [float(y) for y in x.split()] n [float(y) for y in x.split()] print "%d %d" % (gcd(n[0], n[1]),(lcm(n[0], n[1]))) "%d %d" (gcd(n[0], n[1]),(lcm(n[0], n[1]))) gcd(n[0], n[1]) gcd n[0] n 0 n[1] n 1 lcm(n[0], n[1]) lcm n[0] n 0 n[1] n 1 def gcd(x,y):
    if(y>0):
        return gcd(y,x%y)
    else:
        return x def gcd(x,y):
    if(y>0):
        return gcd(y,x%y)
    else:
        return x gcd def lcm(x,y):
    return x/gcd(x,y)*y def lcm(x,y):
    return x/gcd(x,y)*y lcm n = [float(y) for y in x.split()] [float(y) for y in x.split()] n
import sys

def gcd(x,y):
    if(y>0):
        return gcd(y,x%y)
    else:
        return x

def lcm(x,y):
    return x/gcd(x,y)*y

for x in sys.stdin.readlines():
    n = [float(y) for y in x.split()]

    print "%d %d" % (gcd(n[0], n[1]),(lcm(n[0], n[1])))