while True:
    try:
        spam=map(int, input().split(' '))
        spam = [i for i in spam]
        spam.sort()
        cola = spam[0] * spam[1]
        while True:
            if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
            pre = spam[0]
            spam[0] = spam[1] % spam[0]
            spam[1] = pre
    except:
        break while True:
    try:
        spam=map(int, input().split(' '))
        spam = [i for i in spam]
        spam.sort()
        cola = spam[0] * spam[1]
        while True:
            if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
            pre = spam[0]
            spam[0] = spam[1] % spam[0]
            spam[1] = pre
    except:
        break True try:
        spam=map(int, input().split(' '))
        spam = [i for i in spam]
        spam.sort()
        cola = spam[0] * spam[1]
        while True:
            if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
            pre = spam[0]
            spam[0] = spam[1] % spam[0]
            spam[1] = pre
    except:
        break except:
        break break spam=map(int, input().split(' ')) spam map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' i for i in spam for i in spam i spam for i in spam i spam = [i for i in spam] spam [i for i in spam] spam.sort() spam.sort spam sort cola = spam[0] * spam[1] cola spam[0] * spam[1] spam[0] spam 0 spam[1] spam 1 while True:
            if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
            pre = spam[0]
            spam[0] = spam[1] % spam[0]
            spam[1] = pre
     True if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
             spam[0] == 0 spam[0] spam 0 0 print('{} {}'.format(spam[1],int(cola/spam[1]))) print '{} {}'.format(spam[1],int(cola/spam[1])) '{} {}'.format '{} {}' format spam[1] spam 1 int(cola/spam[1]) int cola/spam[1] cola spam[1] spam 1 break pre = spam[0] pre spam[0] spam 0 spam[0] = spam[1] % spam[0] spam[0] spam 0 spam[1] % spam[0] spam[1] spam 1 spam[0] spam 0 spam[1] = pre spam[1] spam 1 pre pre = spam[0] spam[0] pre spam=map(int, input().split(' ')) map(int, input().split(' ')) spam cola = spam[0] * spam[1] spam[0] * spam[1] cola spam = [i for i in spam] [i for i in spam] spam
while True:
    try:
        spam=map(int, input().split(' '))
        spam = [i for i in spam]
        spam.sort()
        cola = spam[0] * spam[1]
        while True:
            if spam[0] == 0:
                print('{} {}'.format(spam[1],int(cola/spam[1])))
                break
            pre = spam[0]
            spam[0] = spam[1] % spam[0]
            spam[1] = pre
    except:
        break