import sys
def gcd(a,b):
    if b== 0:return a
    return gcd(b,a%b)
def return_lcm(a,b):
    prime = gcd(a,b)
    return prime*(a/prime)*(b/prime)
def solve():
    a = []
    for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
    for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1]))

if __name__ == "__main__":
    solve() import sys sys def gcd(a,b):
    if b== 0:return a
    return gcd(b,a%b) gcd if b== 0:return a
     b== 0 b 0 return gcd(b,a%b) gcd(b,a%b) gcd b a%b a b a a b b def return_lcm(a,b):
    prime = gcd(a,b)
    return prime*(a/prime)*(b/prime) return_lcm prime = gcd(a,b) prime gcd(a,b) gcd a b return prime*(a/prime)*(b/prime) prime*(a/prime)*(b/prime) prime*(a/prime) prime a/prime a prime b/prime b prime a a b b def solve():
    a = []
    for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
    for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1])) solve a = [] a [] for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
     line sys.stdin sys stdin digit_list = line.split(' ') digit_list line.split(' ') line.split line split ' ' new_list = [] new_list [] for j in digit_list:
            new_list.append(int(j))
         j digit_list new_list.append(int(j)) new_list.append new_list append int(j) int j a.append(new_list) a.append a append new_list for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1])) data a print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1])) str(gcd(data[0],data[1])) + ' ' str(gcd(data[0],data[1])) str gcd(data[0],data[1]) gcd data[0] data 0 data[1] data 1 ' ' str(return_lcm(data[0],data[1])) str return_lcm(data[0],data[1]) return_lcm data[0] data 0 data[1] data 1 if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def return_lcm(a,b):
    prime = gcd(a,b)
    return prime*(a/prime)*(b/prime) def return_lcm(a,b):
    prime = gcd(a,b)
    return prime*(a/prime)*(b/prime) return_lcm def solve():
    a = []
    for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
    for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1])) def solve():
    a = []
    for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
    for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1])) solve def gcd(a,b):
    if b== 0:return a
    return gcd(b,a%b) def gcd(a,b):
    if b== 0:return a
    return gcd(b,a%b) gcd
import sys
def gcd(a,b):
    if b== 0:return a
    return gcd(b,a%b)
def return_lcm(a,b):
    prime = gcd(a,b)
    return prime*(a/prime)*(b/prime)
def solve():
    a = []
    for line in sys.stdin:
        digit_list = line.split(' ')
        new_list = []
        for j in digit_list:
            new_list.append(int(j))
        a.append(new_list)
    for data in a:
        print str(gcd(data[0],data[1])) + ' ' + str(return_lcm(data[0],data[1]))

if __name__ == "__main__":
    solve()