#include <cstdio>
#define L long long int

L lcm(L a,L b){
  if(a==b)
    return a;
  else if(a<b)
    return lcm(b,a);
  else
    return lcm(a-b,b);
}

L gcd(L a,L b){
  return a*b/lcm(a,b);
}

int main(){
  L a,b;

  while(~scanf("%lld %lld",&a,&b))
    printf("%lld %lld\n",lcm(a,b),gcd(a,b));
}