import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM() import sys sys def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
        GcdLCM for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
        line sys.stdin sys stdin x,y=map(int,line.split()) x map(int,line.split()) map int line.split() line.split line split y if x==None:
            break
        
         x==None x None break gcd = Gcd(x,y) gcd Gcd(x,y) Gcd x y lcm = int(x*y/gcd) lcm int(x*y/gcd) int x*y/gcd x*y x y gcd print("{} {}".format(gcd,lcm)) print "{} {}".format(gcd,lcm) "{} {}".format "{} {}" format gcd lcm def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
     Gcd while x!=0:
        x,y=y%x,x
     x!=0 x 0 x,y=y%x,x x y%x y x y x return y y x x y y GcdLCM() GcdLCM def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
     def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
     Gcd def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
        def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
        GcdLCM
import sys
def GcdLCM():
    for line in sys.stdin:
        x,y=map(int,line.split())
        if x==None:
            break
        
        gcd = Gcd(x,y)
        lcm = int(x*y/gcd)

        print("{} {}".format(gcd,lcm))
       
def Gcd(x,y):
    while x!=0:
        x,y=y%x,x
    return y
        
    
GcdLCM()