while 1:
    try:
        a = list(map(int, input().split()))
        b=list(a)
        a.sort()
        while a[1]%a[0] != 0:
            a[1] %= a[0]
            a.sort()
        print(a[0], int(b[0]*b[1]/a[0]))
    except:
        break while 1:
    try:
        a = list(map(int, input().split()))
        b=list(a)
        a.sort()
        while a[1]%a[0] != 0:
            a[1] %= a[0]
            a.sort()
        print(a[0], int(b[0]*b[1]/a[0]))
    except:
        break 1 try:
        a = list(map(int, input().split()))
        b=list(a)
        a.sort()
        while a[1]%a[0] != 0:
            a[1] %= a[0]
            a.sort()
        print(a[0], int(b[0]*b[1]/a[0]))
    except:
        break except:
        break break a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b=list(a) b list(a) list a a.sort() a.sort a sort while a[1]%a[0] != 0:
            a[1] %= a[0]
            a.sort()
         a[1]%a[0] != 0 a[1]%a[0] a[1] a 1 a[0] a 0 0 a[1] %= a[0] a[1] a 1 a[0] a 0 a.sort() a.sort a sort print(a[0], int(b[0]*b[1]/a[0])) print a[0] a 0 int(b[0]*b[1]/a[0]) int b[0]*b[1]/a[0] b[0]*b[1] b[0] b 0 b[1] b 1 a[0] a 0 b=list(a) list(a) b a = list(map(int, input().split())) list(map(int, input().split())) a
while 1:
    try:
        a = list(map(int, input().split()))
        b=list(a)
        a.sort()
        while a[1]%a[0] != 0:
            a[1] %= a[0]
            a.sort()
        print(a[0], int(b[0]*b[1]/a[0]))
    except:
        break
