import sys

def dividend(num, Q):
    a = Q
    b = (num / Q) * Q
    Q = num - (num / Q) * Q
    if num  == b:
        aaa(a)
        return
    dividend(a, Q)
    
def aaa(greatest_common_divisor):
    least_common_multiple = num1 * num2 / greatest_common_divisor
    print('%s %s' % (greatest_common_divisor, least_common_multiple))
    return

for input_line in sys.stdin:
    num1 = int(input_line.split(' ')[0])
    num2 = int(input_line.split(' ')[1])
    
    if num1 <= num2:
        dividend(num2, num1)
    elif num1 > num2:
        dividend(num1, num2) import sys sys def dividend(num, Q):
    a = Q
    b = (num / Q) * Q
    Q = num - (num / Q) * Q
    if num  == b:
        aaa(a)
        return
    dividend(a, Q)
     dividend a = Q a Q b = (num / Q) * Q b (num / Q) * Q num / Q num Q Q Q = num - (num / Q) * Q Q num - (num / Q) * Q num (num / Q) * Q num / Q num Q Q if num  == b:
        aaa(a)
        return
     num  == b num b aaa(a) aaa a return dividend(a, Q) dividend a Q num num Q Q def aaa(greatest_common_divisor):
    least_common_multiple = num1 * num2 / greatest_common_divisor
    print('%s %s' % (greatest_common_divisor, least_common_multiple))
    return aaa least_common_multiple = num1 * num2 / greatest_common_divisor least_common_multiple num1 * num2 / greatest_common_divisor num1 * num2 num1 num2 greatest_common_divisor print('%s %s' % (greatest_common_divisor, least_common_multiple)) print '%s %s' % (greatest_common_divisor, least_common_multiple) '%s %s' (greatest_common_divisor, least_common_multiple) greatest_common_divisor least_common_multiple return greatest_common_divisor greatest_common_divisor for input_line in sys.stdin:
    num1 = int(input_line.split(' ')[0])
    num2 = int(input_line.split(' ')[1])
    
    if num1 <= num2:
        dividend(num2, num1)
    elif num1 > num2:
        dividend(num1, num2) input_line sys.stdin sys stdin num1 = int(input_line.split(' ')[0]) num1 int(input_line.split(' ')[0]) int input_line.split(' ')[0] input_line.split(' ') input_line.split input_line split ' ' 0 num2 = int(input_line.split(' ')[1]) num2 int(input_line.split(' ')[1]) int input_line.split(' ')[1] input_line.split(' ') input_line.split input_line split ' ' 1 if num1 <= num2:
        dividend(num2, num1)
    elif num1 > num2:
        dividend(num1, num2) num1 <= num2 num1 num2 dividend(num2, num1) dividend num2 num1 elif num1 > num2:
        dividend(num1, num2) num1 > num2 num1 num2 dividend(num1, num2) dividend num1 num2 def aaa(greatest_common_divisor):
    least_common_multiple = num1 * num2 / greatest_common_divisor
    print('%s %s' % (greatest_common_divisor, least_common_multiple))
    return def aaa(greatest_common_divisor):
    least_common_multiple = num1 * num2 / greatest_common_divisor
    print('%s %s' % (greatest_common_divisor, least_common_multiple))
    return aaa num1 = int(input_line.split(' ')[0]) int(input_line.split(' ')[0]) num1 def dividend(num, Q):
    a = Q
    b = (num / Q) * Q
    Q = num - (num / Q) * Q
    if num  == b:
        aaa(a)
        return
    dividend(a, Q)
     def dividend(num, Q):
    a = Q
    b = (num / Q) * Q
    Q = num - (num / Q) * Q
    if num  == b:
        aaa(a)
        return
    dividend(a, Q)
     dividend num2 = int(input_line.split(' ')[1]) int(input_line.split(' ')[1]) num2
import sys

def dividend(num, Q):
    a = Q
    b = (num / Q) * Q
    Q = num - (num / Q) * Q
    if num  == b:
        aaa(a)
        return
    dividend(a, Q)
    
def aaa(greatest_common_divisor):
    least_common_multiple = num1 * num2 / greatest_common_divisor
    print('%s %s' % (greatest_common_divisor, least_common_multiple))
    return

for input_line in sys.stdin:
    num1 = int(input_line.split(' ')[0])
    num2 = int(input_line.split(' ')[1])
    
    if num1 <= num2:
        dividend(num2, num1)
    elif num1 > num2:
        dividend(num1, num2)