#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a[50] = {};
	int b[50] = {};
	int g[50] = {};
	int l[50] = {};
	int i = 0;
	while (cin >> a[i] >> b[i]) {
		i++;
	}
	for (int j = 0; j < i; j++) {
		int n, m,aa,bb;
		aa = a[j];
		bb = b[j];
		while (a[j] != b[j]) {

			m = max(a[j], b[j]);
			n =	max(a[j], b[j])  % min(a[j], b[j]);
			a[j] = m;
			b[j] = n;
			
		}
		g[j] = a[j];
		if (g[j] != 0) {
			aa = aa / g[j];
			bb = bb / g[j];
		}
		l[j] = aa * bb * g[j];
		
	}
	for (int k = 0; k < i; k++) {
		cout << g[k] << l[k] << endl;
	}
	return 0;
}