import sys
def kouyakusuu(a,b):
  A = max(a,b)
  B = min(a,b)
  d = A % B
  if d == 0:
    return B
  else:
    return kouyakusuu(B,d)
for line in sys.stdin.readlines():
  a,b = map(int,line.split())
  m = kouyakusuu(a,b)
  n = a*b//m
  print(m,n) import sys sys def kouyakusuu(a,b):
  A = max(a,b)
  B = min(a,b)
  d = A % B
  if d == 0:
    return B
  else:
    return kouyakusuu(B,d) kouyakusuu A = max(a,b) A max(a,b) max a b B = min(a,b) B min(a,b) min a b d = A % B d A % B A B if d == 0:
    return B
  else:
    return kouyakusuu(B,d) d == 0 d 0 return B B return kouyakusuu(B,d) kouyakusuu(B,d) kouyakusuu B d a a b b for line in sys.stdin.readlines():
  a,b = map(int,line.split())
  m = kouyakusuu(a,b)
  n = a*b//m
  print(m,n) line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines a,b = map(int,line.split()) a map(int,line.split()) map int line.split() line.split line split b m = kouyakusuu(a,b) m kouyakusuu(a,b) kouyakusuu a b n = a*b//m n a*b//m a*b a b m print(m,n) print m n a,b = map(int,line.split()) map(int,line.split()) a b = map(int,line.split()) map(int,line.split()) b def kouyakusuu(a,b):
  A = max(a,b)
  B = min(a,b)
  d = A % B
  if d == 0:
    return B
  else:
    return kouyakusuu(B,d) def kouyakusuu(a,b):
  A = max(a,b)
  B = min(a,b)
  d = A % B
  if d == 0:
    return B
  else:
    return kouyakusuu(B,d) kouyakusuu m = kouyakusuu(a,b) kouyakusuu(a,b) m n = a*b//m a*b//m n
import sys
def kouyakusuu(a,b):
  A = max(a,b)
  B = min(a,b)
  d = A % B
  if d == 0:
    return B
  else:
    return kouyakusuu(B,d)
for line in sys.stdin.readlines():
  a,b = map(int,line.split())
  m = kouyakusuu(a,b)
  n = a*b//m
  print(m,n)