while(True):
    try:
        (a, b) = map(int, input().split(" "))
        (x, y) = (a, b)
        while (x != 0):
            (x, y) = (y%x, x)
        print("%s %s" %(y, a*b//y))
    except:
        break while(True):
    try:
        (a, b) = map(int, input().split(" "))
        (x, y) = (a, b)
        while (x != 0):
            (x, y) = (y%x, x)
        print("%s %s" %(y, a*b//y))
    except:
        break True try:
        (a, b) = map(int, input().split(" "))
        (x, y) = (a, b)
        while (x != 0):
            (x, y) = (y%x, x)
        print("%s %s" %(y, a*b//y))
    except:
        break except:
        break break (a, b) = map(int, input().split(" ")) (a, b) a b map(int, input().split(" ")) map int input().split(" ") ().split () input split " " (x, y) = (a, b) (x, y) x y (a, b) a b while (x != 0):
            (x, y) = (y%x, x)
         x != 0 x 0 (x, y) = (y%x, x) (x, y) x y (y%x, x) y%x y x x print("%s %s" %(y, a*b//y)) print "%s %s" %(y, a*b//y) "%s %s" (y, a*b//y) y a*b//y a*b a b y
while(True):
    try:
        (a, b) = map(int, input().split(" "))
        (x, y) = (a, b)
        while (x != 0):
            (x, y) = (y%x, x)
        print("%s %s" %(y, a*b//y))
    except:
        break