import math

try:
    while True:
        a, b = list(map(int, input().split()))
        print("{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b)))
except Exception as _:
    pass import math math try:
    while True:
        a, b = list(map(int, input().split()))
        print("{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b)))
except Exception as _:
    pass except Exception as _:
    pass while True:
        a, b = list(map(int, input().split()))
        print("{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b))) True 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("{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b))) print "{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b)) "{} {}".format "{} {}" format math.gcd(a, b) math.gcd math gcd a b (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

try:
    while True:
        a, b = list(map(int, input().split()))
        print("{} {}".format(math.gcd(a, b), (a * b) // math.gcd(a, b)))
except Exception as _:
    pass
