import sys

def gcd(a,b):
  if b == 0: return a
  else: return gcd(b,a%b)
  
for i in sys.stdin:
  a, b = map(int, i.split())
  g = gcd(a,b)
  print g, a/g*b import sys sys def gcd(a,b):
  if b == 0: return a
  else: return gcd(b,a%b)
   gcd if b == 0: return a
  else: return gcd(b,a%b)
   b == 0 b 0 a a b b for i in sys.stdin:
  a, b = map(int, i.split())
  g = gcd(a,b)
  print g, a/g*b i sys.stdin sys stdin a, b = map(int, i.split()) a map(int, i.split()) map int i.split() i.split i split b g = gcd(a,b) g gcd(a,b) gcd a b print g a/g*b a/g a g b b = map(int, i.split()) map(int, i.split()) b def gcd(a,b):
  if b == 0: return a
  else: return gcd(b,a%b)
   def gcd(a,b):
  if b == 0: return a
  else: return gcd(b,a%b)
   gcd a, b = map(int, i.split()) map(int, i.split()) a g = gcd(a,b) gcd(a,b) g
import sys

def gcd(a,b):
  if b == 0: return a
  else: return gcd(b,a%b)
  
for i in sys.stdin:
  a, b = map(int, i.split())
  g = gcd(a,b)
  print g, a/g*b