def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)
def lcm(a, b):
  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):
  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):
  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 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,b) a b map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split print gcd(a,b) gcd a b lcm(a,b) lcm a b def lcm(a, b):
  return a*b/gcd(a, b) def lcm(a, b):
  return a*b/gcd(a, b) 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
def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a%b)
def lcm(a, b):
  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