# This program computes GCD and LCM
# -*- coding: utf-8
import sys


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


for i in sys.stdin:
    try:
        line = [int(k) for k in i.split(" ")]
        g = gcd(min(line), max(line))
        print(str(g) + " " + str(line[0]*line[1]//g))
    except:
        exit() import sys sys def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a gcd while b != 0:
        a, b = b, a % b
     b != 0 b 0 a, b = b, a % b a b b a % b a b return a a a a b b for i in sys.stdin:
    try:
        line = [int(k) for k in i.split(" ")]
        g = gcd(min(line), max(line))
        print(str(g) + " " + str(line[0]*line[1]//g))
    except:
        exit() i sys.stdin sys stdin try:
        line = [int(k) for k in i.split(" ")]
        g = gcd(min(line), max(line))
        print(str(g) + " " + str(line[0]*line[1]//g))
    except:
        exit() except:
        exit() exit() exit int(k) for k in i.split(" ") for k in i.split(" ") k i.split(" ") i.split i split " " for k in i.split(" ") int(k) int k line = [int(k) for k in i.split(" ")] line [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) g gcd(min(line), max(line)) gcd min(line) min line max(line) max line print(str(g) + " " + str(line[0]*line[1]//g)) print str(g) + " " + str(line[0]*line[1]//g) str(g) + " " str(g) str g " " str(line[0]*line[1]//g) str line[0]*line[1]//g line[0]*line[1] line[0] line 0 line[1] line 1 g def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a gcd g = gcd(min(line), max(line)) gcd(min(line), max(line)) g line = [int(k) for k in i.split(" ")] [int(k) for k in i.split(" ")] line
# This program computes GCD and LCM
# -*- coding: utf-8
import sys


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


for i in sys.stdin:
    try:
        line = [int(k) for k in i.split(" ")]
        g = gcd(min(line), max(line))
        print(str(g) + " " + str(line[0]*line[1]//g))
    except:
        exit()