#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

def gcd( a, b ):
  while b > 0:
    a, b = b, a%b
  return a

def lcm( a, b ):
  return a*b/gcd( a, b )

for s in sys.stdin:
  d = map(int, s.split())
  a,b = d[0],d[1]
  print gcd(a,b),lcm(a,b) import sys sys def gcd( a, b ):
  while b > 0:
    a, b = b, a%b
  return a gcd while b > 0:
    a, b = b, a%b
   b > 0 b 0 a, b = b, a%b a b b a%b a b return a a 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 for s in sys.stdin:
  d = map(int, s.split())
  a,b = d[0],d[1]
  print gcd(a,b),lcm(a,b) s sys.stdin sys stdin d = map(int, s.split()) d map(int, s.split()) map int s.split() s.split s split a,b = d[0],d[1] a d[0] d 0 b d[1] d 1 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 d = map(int, s.split()) map(int, s.split()) d def gcd( a, b ):
  while b > 0:
    a, b = b, a%b
  return a def gcd( a, b ):
  while b > 0:
    a, b = b, a%b
  return a gcd a,b = d[0],d[1] d[0] a b = d[0],d[1] d[1] b
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

def gcd( a, b ):
  while b > 0:
    a, b = b, a%b
  return a

def lcm( a, b ):
  return a*b/gcd( a, b )

for s in sys.stdin:
  d = map(int, s.split())
  a,b = d[0],d[1]
  print gcd(a,b),lcm(a,b)