import math

while True:
    try:
        a, b = list(map(int, input().split()))
        print('{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b))))
    except EOFError:
        break
 import math math while True:
    try:
        a, b = list(map(int, input().split()))
        print('{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b))))
    except EOFError:
        break True try:
        a, b = list(map(int, input().split()))
        print('{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b))))
    except EOFError:
        break except EOFError:
        break break a, b = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b print('{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b)))) print '{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b))) '{0} {1}'.format '{0} {1}' format math.gcd(a, b) math.gcd math gcd a b int(a * b / math.gcd(a, b)) int a * b / math.gcd(a, b) a * b a b math.gcd(a, b) math.gcd math gcd a b b = list(map(int, input().split())) list(map(int, input().split())) b a, b = list(map(int, input().split())) list(map(int, input().split())) a
import math

while True:
    try:
        a, b = list(map(int, input().split()))
        print('{0} {1}'.format(math.gcd(a, b), int(a * b / math.gcd(a, b))))
    except EOFError:
        break

