# Aizu Problem 0006: GCD and LCM
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def gcd(a, b):
    while b != 0:
       t = b
       b = a % b
       a = t
    return a


def lcm(a, b):
    return (a * b) // gcd(a, b)


for line in sys.stdin:
    a, b = [int(_) for _ in line.split()]
    print(gcd(a, b), lcm(a, b)) import sys, math, os sys math os PYDEV = os.environ.get('PYDEV') PYDEV os.environ.get('PYDEV') os.environ.get os.environ os environ get 'PYDEV' if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt") PYDEV=="True" PYDEV "True" sys.stdin = open("sample-input.txt", "rt") sys.stdin sys stdin open("sample-input.txt", "rt") open "sample-input.txt" "rt" def gcd(a, b):
    while b != 0:
       t = b
       b = a % b
       a = t
    return a gcd while b != 0:
       t = b
       b = a % b
       a = t
     b != 0 b 0 t = b t b b = a % b b a % b a b a = t a t return a a a a b b def lcm(a, b):
    return (a * b) // gcd(a, b) lcm return (a * b) // gcd(a, b) (a * b) // gcd(a, b) a * b a b gcd(a, b) gcd a b a a b b for line in sys.stdin:
    a, b = [int(_) for _ in line.split()]
    print(gcd(a, b), lcm(a, b)) line sys.stdin sys stdin int(_) for _ in line.split() for _ in line.split() _ line.split() line.split line split for _ in line.split() int(_) int _ a, b = [int(_) for _ in line.split()] a [int(_) for _ in line.split()] b print(gcd(a, b), lcm(a, b)) print gcd(a, b) gcd a b lcm(a, b) lcm a b PYDEV = os.environ.get('PYDEV') os.environ.get('PYDEV') PYDEV def lcm(a, b):
    return (a * b) // gcd(a, b) def lcm(a, b):
    return (a * b) // gcd(a, b) lcm a, b = [int(_) for _ in line.split()] [int(_) for _ in line.split()] a def gcd(a, b):
    while b != 0:
       t = b
       b = a % b
       a = t
    return a def gcd(a, b):
    while b != 0:
       t = b
       b = a % b
       a = t
    return a gcd b = [int(_) for _ in line.split()] [int(_) for _ in line.split()] b
# Aizu Problem 0006: GCD and LCM
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def gcd(a, b):
    while b != 0:
       t = b
       b = a % b
       a = t
    return a


def lcm(a, b):
    return (a * b) // gcd(a, b)


for line in sys.stdin:
    a, b = [int(_) for _ in line.split()]
    print(gcd(a, b), lcm(a, b))