import math
import sys
for line in sys.stdin.readlines():
    a, b = list(map(int, line.split()))
    print(f'{math.gcd(a,b)} {a*b//math.gcd(a,b)}')
 import math math import sys sys for line in sys.stdin.readlines():
    a, b = list(map(int, line.split()))
    print(f'{math.gcd(a,b)} {a*b//math.gcd(a,b)}') line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines a, b = list(map(int, line.split())) a list(map(int, line.split())) list map(int, line.split()) map int line.split() line.split line split b print(f'{math.gcd(a,b)} {a*b//math.gcd(a,b)}') print f'{math.gcd(a,b)} {a*b//math.gcd(a,b)}' a, b = list(map(int, line.split())) list(map(int, line.split())) a b = list(map(int, line.split())) list(map(int, line.split())) b
import math
import sys
for line in sys.stdin.readlines():
    a, b = list(map(int, line.split()))
    print(f'{math.gcd(a,b)} {a*b//math.gcd(a,b)}')

