function GCD(a,b){
   var m=Math.max(a,b);
   var n=Math.min(a,b);
   while(n!=0){
      var N=n;
      n=m%n;
      m=N;
   }
   return m;
}
  
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
Arr.forEach(function(v){
   var arr=v.split(" ").map(Number);
   var gcd=GCD(arr[0],arr[1]);
   var lcm=arr[0]*arr[1]/gcd;
   console.log(gcd+" "+lcm);
});