while True:
    try:
        lst = list(map(int, input().split()))
        a, b = lst[0], lst[1]
        while b != 0:
            a, b = b, a % b
            
        c = lst[0]* lst[1]/ a
        print('{:.0f}'.format(a), end = " ")
        print('{:.0f}'.format(c))

    except:
        break while True:
    try:
        lst = list(map(int, input().split()))
        a, b = lst[0], lst[1]
        while b != 0:
            a, b = b, a % b
            
        c = lst[0]* lst[1]/ a
        print('{:.0f}'.format(a), end = " ")
        print('{:.0f}'.format(c))

    except:
        break True try:
        lst = list(map(int, input().split()))
        a, b = lst[0], lst[1]
        while b != 0:
            a, b = b, a % b
            
        c = lst[0]* lst[1]/ a
        print('{:.0f}'.format(a), end = " ")
        print('{:.0f}'.format(c))

    except:
        break except:
        break break lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a, b = lst[0], lst[1] a lst[0] lst 0 b lst[1] lst 1 while b != 0:
            a, b = b, a % b
            
         b != 0 b 0 a, b = b, a % b a b b a % b a b c = lst[0]* lst[1]/ a c lst[0]* lst[1]/ a lst[0]* lst[1] lst[0] lst 0 lst[1] lst 1 a print('{:.0f}'.format(a), end = " ") print '{:.0f}'.format(a) '{:.0f}'.format '{:.0f}' format a end = " " end " " print('{:.0f}'.format(c)) print '{:.0f}'.format(c) '{:.0f}'.format '{:.0f}' format c b = lst[0], lst[1] lst[1] b b = b, a % b a % b b lst = list(map(int, input().split())) list(map(int, input().split())) lst a, b = b, a % b b a a, b = lst[0], lst[1] lst[0] a c = lst[0]* lst[1]/ a lst[0]* lst[1]/ a c
while True:
    try:
        lst = list(map(int, input().split()))
        a, b = lst[0], lst[1]
        while b != 0:
            a, b = b, a % b
            
        c = lst[0]* lst[1]/ a
        print('{:.0f}'.format(a), end = " ")
        print('{:.0f}'.format(c))

    except:
        break
