#!/usr/bin/env python3
import sys
from fractions import gcd

for line in sys.stdin:
    [a, b] = [int(x) for x in line.split()]
    print(int(gcd(a, b)), int(a / gcd(a, b) * b)) import sys sys from fractions import gcd for line in sys.stdin:
    [a, b] = [int(x) for x in line.split()]
    print(int(gcd(a, b)), int(a / gcd(a, b) * b)) line sys.stdin sys stdin int(x) for x in line.split() for x in line.split() x line.split() line.split line split for x in line.split() int(x) int x [a, b] = [int(x) for x in line.split()] [a, b] a b [int(x) for x in line.split()] print(int(gcd(a, b)), int(a / gcd(a, b) * b)) print int(gcd(a, b)) int gcd(a, b) gcd a b int(a / gcd(a, b) * b) int a / gcd(a, b) * b a / gcd(a, b) a gcd(a, b) gcd a b b
#!/usr/bin/env python3
import sys
from fractions import gcd

for line in sys.stdin:
    [a, b] = [int(x) for x in line.split()]
    print(int(gcd(a, b)), int(a / gcd(a, b) * b))