import math
try:
    while True:
        a, b= map(int, input().split())
        print(math.gcd(a, b),(a*b)//math.gcd(a,b))
except EOFError:
    pass import math math try:
    while True:
        a, b= map(int, input().split())
        print(math.gcd(a, b),(a*b)//math.gcd(a,b))
except EOFError:
    pass except EOFError:
    pass while True:
        a, b= map(int, input().split())
        print(math.gcd(a, b),(a*b)//math.gcd(a,b)) True a, b= map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b print(math.gcd(a, b),(a*b)//math.gcd(a,b)) print 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= map(int, input().split()) map(int, input().split()) b a, b= map(int, input().split()) map(int, input().split()) a
import math
try:
    while True:
        a, b= map(int, input().split())
        print(math.gcd(a, b),(a*b)//math.gcd(a,b))
except EOFError:
    pass
