
def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a

def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b)

try:
 while True:
  a, b = map(int, raw_input().split(' '))
  print gcd(a, b), lcm(a, b)
except EOFError:
  pass def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a gcd """Return greatest common divisor using Euclid's Algorithm.""" while b:      
        a, b = b, a % b
     b a, b = b, a % b a b b a % b a b return a a a a b b def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b) lcm """Return lowest common multiple.""" 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 try:
 while True:
  a, b = map(int, raw_input().split(' '))
  print gcd(a, b), lcm(a, b)
except EOFError:
  pass except EOFError:
  pass while True:
  a, b = map(int, raw_input().split(' '))
  print gcd(a, b), lcm(a, b) True a, b = map(int, raw_input().split(' ')) a map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' b print gcd(a, b) gcd a b lcm(a, b) lcm a b a, b = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) a def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a gcd def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b) def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b) lcm b = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) b

def gcd(a, b):
    """Return greatest common divisor using Euclid's Algorithm."""
    while b:      
        a, b = b, a % b
    return a

def lcm(a, b):
    """Return lowest common multiple."""
    return a * b // gcd(a, b)

try:
 while True:
  a, b = map(int, raw_input().split(' '))
  print gcd(a, b), lcm(a, b)
except EOFError:
  pass