while True:
    try:
        # a >=b
        a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True)
        d = a * b

        # calc. gcm by　ユークリッド互除法
        while True:
            c = a % b
            # print("{0} {1} {2}".format(a, b, c))
            if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
        gcm = b
        lcm = d / gcm
        # print("gcm is {}".format(b))
        print("{0:d} {1:d}".format(int(gcm), int(lcm)))

        #print("{0} {1}".format(a, b))
        #a, b = sorted([b, a % b], reverse=True)
        #print("{0} {1}".format(a, b))

    except EOFError:
        break  # escape from while loop while True:
    try:
        # a >=b
        a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True)
        d = a * b

        # calc. gcm by　ユークリッド互除法
        while True:
            c = a % b
            # print("{0} {1} {2}".format(a, b, c))
            if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
        gcm = b
        lcm = d / gcm
        # print("gcm is {}".format(b))
        print("{0:d} {1:d}".format(int(gcm), int(lcm)))

        #print("{0} {1}".format(a, b))
        #a, b = sorted([b, a % b], reverse=True)
        #print("{0} {1}".format(a, b))

    except EOFError:
        break  # escape from while loop True try:
        # a >=b
        a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True)
        d = a * b

        # calc. gcm by　ユークリッド互除法
        while True:
            c = a % b
            # print("{0} {1} {2}".format(a, b, c))
            if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
        gcm = b
        lcm = d / gcm
        # print("gcm is {}".format(b))
        print("{0:d} {1:d}".format(int(gcm), int(lcm)))

        #print("{0} {1}".format(a, b))
        #a, b = sorted([b, a % b], reverse=True)
        #print("{0} {1}".format(a, b))

    except EOFError:
        break  # escape from while loop except EOFError:
        break  # escape from while loop break a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True) a sorted(map(int, input().strip("\n").split(" ")), reverse=True) sorted map(int, input().strip("\n").split(" ")) map int input().strip("\n").split(" ") ().strip("\n").split ().strip("\n") ().strip () input strip "\n" split " " reverse=True reverse True b d = a * b d a * b a b while True:
            c = a % b
            # print("{0} {1} {2}".format(a, b, c))
            if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
         True c = a % b c a % b a b if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
         c == 0 c 0 break a, b = sorted([b, a % b], reverse=True) a sorted([b, a % b], reverse=True) sorted [b, a % b] b a % b a b reverse=True reverse True b gcm = b gcm b lcm = d / gcm lcm d / gcm d gcm print("{0:d} {1:d}".format(int(gcm), int(lcm))) print "{0:d} {1:d}".format(int(gcm), int(lcm)) "{0:d} {1:d}".format "{0:d} {1:d}" format int(gcm) int gcm int(lcm) int lcm lcm = d / gcm d / gcm lcm d = a * b a * b d gcm = b b gcm a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True) sorted(map(int, input().strip("\n").split(" ")), reverse=True) a b = sorted(map(int, input().strip("\n").split(" ")), reverse=True) sorted(map(int, input().strip("\n").split(" ")), reverse=True) b a, b = sorted([b, a % b], reverse=True) sorted([b, a % b], reverse=True) a c = a % b a % b c b = sorted([b, a % b], reverse=True) sorted([b, a % b], reverse=True) b
while True:
    try:
        # a >=b
        a, b = sorted(map(int, input().strip("\n").split(" ")), reverse=True)
        d = a * b

        # calc. gcm by　ユークリッド互除法
        while True:
            c = a % b
            # print("{0} {1} {2}".format(a, b, c))
            if c == 0:
                break
            else:
                a, b = sorted([b, a % b], reverse=True)
        gcm = b
        lcm = d / gcm
        # print("gcm is {}".format(b))
        print("{0:d} {1:d}".format(int(gcm), int(lcm)))

        #print("{0} {1}".format(a, b))
        #a, b = sorted([b, a % b], reverse=True)
        #print("{0} {1}".format(a, b))

    except EOFError:
        break  # escape from while loop