import sys
 
nums = []
 
 
for line in sys.stdin:
    nums.append(line)
 
for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = int(input_line[0])
    b = int(input_line[1])
 
    if a > b:
        num_bigger = a
        num_smaller = b
    else:
        num_bigger = b
        num_smaller = a

    r = 1   #?????????
    while r > 0:
        r = num_bigger % num_smaller
        num_bigger = num_smaller
        num_smaller = r

    max_common_div = num_bigger
    min_common_mpl = int((a * b)/max_common_div)
 
    print(str(max_common_div) + " " + str(min_common_mpl)) import sys sys nums = [] nums [] for line in sys.stdin:
    nums.append(line)
  line sys.stdin sys stdin nums.append(line) nums.append nums append line for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = int(input_line[0])
    b = int(input_line[1])
 
    if a > b:
        num_bigger = a
        num_smaller = b
    else:
        num_bigger = b
        num_smaller = a

    r = 1   #?????????
    while r > 0:
        r = num_bigger % num_smaller
        num_bigger = num_smaller
        num_smaller = r

    max_common_div = num_bigger
    min_common_mpl = int((a * b)/max_common_div)
 
    print(str(max_common_div) + " " + str(min_common_mpl)) i range(len(nums)) range len(nums) len nums input_line = nums[i].split(" ") input_line nums[i].split(" ") [i].split [i] nums i split " " a = int(input_line[0]) a int(input_line[0]) int input_line[0] input_line 0 b = int(input_line[1]) b int(input_line[1]) int input_line[1] input_line 1 if a > b:
        num_bigger = a
        num_smaller = b
    else:
        num_bigger = b
        num_smaller = a

     a > b a b num_bigger = a num_bigger a num_smaller = b num_smaller b num_bigger = b num_bigger b num_smaller = a num_smaller a r = 1 r 1 while r > 0:
        r = num_bigger % num_smaller
        num_bigger = num_smaller
        num_smaller = r

     r > 0 r 0 r = num_bigger % num_smaller r num_bigger % num_smaller num_bigger num_smaller num_bigger = num_smaller num_bigger num_smaller num_smaller = r num_smaller r max_common_div = num_bigger max_common_div num_bigger min_common_mpl = int((a * b)/max_common_div) min_common_mpl int((a * b)/max_common_div) int (a * b)/max_common_div a * b a b max_common_div print(str(max_common_div) + " " + str(min_common_mpl)) print str(max_common_div) + " " + str(min_common_mpl) str(max_common_div) + " " str(max_common_div) str max_common_div " " str(min_common_mpl) str min_common_mpl input_line = nums[i].split(" ") nums[i].split(" ") input_line a = int(input_line[0]) int(input_line[0]) a b = int(input_line[1]) int(input_line[1]) b num_bigger = a a num_bigger r = num_bigger % num_smaller num_bigger % num_smaller r min_common_mpl = int((a * b)/max_common_div) int((a * b)/max_common_div) min_common_mpl max_common_div = num_bigger num_bigger max_common_div num_bigger = b b num_bigger num_smaller = r r num_smaller nums = [] [] nums num_smaller = b b num_smaller num_smaller = a a num_smaller r = 1 1 r num_bigger = num_smaller num_smaller num_bigger
import sys
 
nums = []
 
 
for line in sys.stdin:
    nums.append(line)
 
for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = int(input_line[0])
    b = int(input_line[1])
 
    if a > b:
        num_bigger = a
        num_smaller = b
    else:
        num_bigger = b
        num_smaller = a

    r = 1   #?????????
    while r > 0:
        r = num_bigger % num_smaller
        num_bigger = num_smaller
        num_smaller = r

    max_common_div = num_bigger
    min_common_mpl = int((a * b)/max_common_div)
 
    print(str(max_common_div) + " " + str(min_common_mpl))