
import sys
import fractions
import re


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


#input_file = open(sys.argv[1], "r")

#for line in input_file:
for line in sys.stdin:
    ab = map(int, re.split(" +", line))
    a, b = tuple(ab)
    gcd_ab = fractions.gcd(a, b)
    lcm_ab = lcm(a, b)
    print gcd_ab, lcm_ab import sys sys import fractions fractions import re re def lcm(a, b):
    return a / fractions.gcd(a, b) * b


#input_file = open(sys.argv[1], "r")

#for line in input_file: lcm return a / fractions.gcd(a, b) * b a / fractions.gcd(a, b) * b a / fractions.gcd(a, b) a fractions.gcd(a, b) fractions.gcd fractions gcd a b b a a b b for line in sys.stdin:
    ab = map(int, re.split(" +", line))
    a, b = tuple(ab)
    gcd_ab = fractions.gcd(a, b)
    lcm_ab = lcm(a, b)
    print gcd_ab, lcm_ab line sys.stdin sys stdin ab = map(int, re.split(" +", line)) ab map(int, re.split(" +", line)) map int re.split(" +", line) re.split re split " +" line a, b = tuple(ab) a tuple(ab) tuple ab b gcd_ab = fractions.gcd(a, b) gcd_ab fractions.gcd(a, b) fractions.gcd fractions gcd a b lcm_ab = lcm(a, b) lcm_ab lcm(a, b) lcm a b print gcd_ab lcm_ab ab = map(int, re.split(" +", line)) map(int, re.split(" +", line)) ab lcm_ab = lcm(a, b) lcm(a, b) lcm_ab def lcm(a, b):
    return a / fractions.gcd(a, b) * b


#input_file = open(sys.argv[1], "r")

#for line in input_file: def lcm(a, b):
    return a / fractions.gcd(a, b) * b


#input_file = open(sys.argv[1], "r")

#for line in input_file: lcm a, b = tuple(ab) tuple(ab) a gcd_ab = fractions.gcd(a, b) fractions.gcd(a, b) gcd_ab b = tuple(ab) tuple(ab) b

import sys
import fractions
import re


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


#input_file = open(sys.argv[1], "r")

#for line in input_file:
for line in sys.stdin:
    ab = map(int, re.split(" +", line))
    a, b = tuple(ab)
    gcd_ab = fractions.gcd(a, b)
    lcm_ab = lcm(a, b)
    print gcd_ab, lcm_ab