#include <iostream>
#include <cmath>

using namespace std;

int rez(int64_t a, int64_t b)
{
   if(b == 0)return a;
   else
   return rez(b, a%b);
}

int main()
{
    while(x != -1)
{
   int a, b;
   cin >> a >> b;
   cout << rez(a, b) << (a*b)/rez(a, b) << endl;
}


}