#include <iostream>
using namespace std;

int LCM(int n, int m);

int main()
{
  int a, b, lcm;
  long long gcd;
  while (cin >> a >> b){
    if (a > b){
      int c = a;
      a = b;
      b = c;
    }
    lcm = LCM(a, b);
    gcd = a * b / lcm;

    cout << lcm << " " << gcd << endl;
  }
}

int LCM(int n, int m)
{
  if (n == 0){
    return (m);
  }
  m = m % n;
  return (LCM(m, n));
}