def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b,a%b)

def lcm(a,b):
  d = (a*b) / gcd(a,b)
  print d
while True:
  try:
   x = map(int,raw_input().split(" "))
   a,b = x[0],x[1]
   print gcd(a,b),(a*b)/gcd(a,b)

  except EOFError:
    break 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 return a a return gcd(b,a%b) gcd(b,a%b) gcd b a%b a b a a b b def lcm(a,b):
  d = (a*b) / gcd(a,b)
  print d lcm d = (a*b) / gcd(a,b) d (a*b) / gcd(a,b) a*b a b gcd(a,b) gcd a b print a a b b while True:
  try:
   x = map(int,raw_input().split(" "))
   a,b = x[0],x[1]
   print gcd(a,b),(a*b)/gcd(a,b)

  except EOFError:
    break True try:
   x = map(int,raw_input().split(" "))
   a,b = x[0],x[1]
   print gcd(a,b),(a*b)/gcd(a,b)

  except EOFError:
    break except EOFError:
    break break x = map(int,raw_input().split(" ")) x map(int,raw_input().split(" ")) map int raw_input().split(" ") ().split () raw_input split " " a,b = x[0],x[1] a x[0] x 0 b x[1] x 1 print gcd(a,b) gcd a b (a*b)/gcd(a,b) a*b a b gcd(a,b) gcd a b a,b = x[0],x[1] x[0] a b = x[0],x[1] x[1] b def lcm(a,b):
  d = (a*b) / gcd(a,b)
  print d def lcm(a,b):
  d = (a*b) / gcd(a,b)
  print d lcm 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 x = map(int,raw_input().split(" ")) map(int,raw_input().split(" ")) x
def gcd(a,b):
  if b == 0:
    return a
  else:
    return gcd(b,a%b)

def lcm(a,b):
  d = (a*b) / gcd(a,b)
  print d
while True:
  try:
   x = map(int,raw_input().split(" "))
   a,b = x[0],x[1]
   print gcd(a,b),(a*b)/gcd(a,b)

  except EOFError:
    break