import sys
for i in sys.stdin:
    a,b=map(int,i.split())
    if a<b:a,b=b,a
    def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
    def lcm(x,y):
         return x*y/gcd(x,y)
    print(gcd(a,b),int(lcm(a,b))) import sys sys for i in sys.stdin:
    a,b=map(int,i.split())
    if a<b:a,b=b,a
    def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
    def lcm(x,y):
         return x*y/gcd(x,y)
    print(gcd(a,b),int(lcm(a,b))) i sys.stdin sys stdin a,b=map(int,i.split()) a map(int,i.split()) map int i.split() i.split i split b if a<b:a,b=b,a
     a<b a b def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
     gcd while y>0:x,y=y,x%y
         y>0 y 0 return x x x x y y def lcm(x,y):
         return x*y/gcd(x,y)
     lcm return x*y/gcd(x,y) x*y/gcd(x,y) x*y x y gcd(x,y) gcd x y x x y y print(gcd(a,b),int(lcm(a,b))) print gcd(a,b) gcd a b int(lcm(a,b)) int lcm(a,b) lcm a b a,b=map(int,i.split()) map(int,i.split()) a b=map(int,i.split()) map(int,i.split()) b def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
     def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
     gcd def lcm(x,y):
         return x*y/gcd(x,y)
     def lcm(x,y):
         return x*y/gcd(x,y)
     lcm
import sys
for i in sys.stdin:
    a,b=map(int,i.split())
    if a<b:a,b=b,a
    def gcd(x,y):
        while y>0:x,y=y,x%y
        return x
    def lcm(x,y):
         return x*y/gcd(x,y)
    print(gcd(a,b),int(lcm(a,b)))