#coding:utf-8

while True:
    try:
        a, b = map(int, raw_input(). split())
        x = a * b
        while True:
            c = a % b
            a = b
            b = c
            if b == 0:
                break
        x = x / a
        print("%d %d" % (a, x))
    except:
        break while True:
    try:
        a, b = map(int, raw_input(). split())
        x = a * b
        while True:
            c = a % b
            a = b
            b = c
            if b == 0:
                break
        x = x / a
        print("%d %d" % (a, x))
    except:
        break True try:
        a, b = map(int, raw_input(). split())
        x = a * b
        while True:
            c = a % b
            a = b
            b = c
            if b == 0:
                break
        x = x / a
        print("%d %d" % (a, x))
    except:
        break except:
        break break a, b = map(int, raw_input(). split()) a map(int, raw_input(). split()) map int raw_input(). split() (). split () raw_input split b x = a * b x a * b a b while True:
            c = a % b
            a = b
            b = c
            if b == 0:
                break
         True c = a % b c a % b a b a = b a b b = c b c if b == 0:
                break
         b == 0 b 0 break x = x / a x x / a x a print("%d %d" % (a, x)) print "%d %d" % (a, x) "%d %d" (a, x) a x a, b = map(int, raw_input(). split()) map(int, raw_input(). split()) a x = x / a x / a x x = a * b a * b x b = map(int, raw_input(). split()) map(int, raw_input(). split()) b a = b b a c = a % b a % b c b = c c b
#coding:utf-8

while True:
    try:
        a, b = map(int, raw_input(). split())
        x = a * b
        while True:
            c = a % b
            a = b
            b = c
            if b == 0:
                break
        x = x / a
        print("%d %d" % (a, x))
    except:
        break