
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long ll;
typedef vector<int> VI;
typedef pair<int, int> PII;

#define REP(i,s,t) for(int i=(s);i<(t);i++)
#define FILL(x,v) memset(x,v,sizeof(x))

const int INF = (int)1E9;
#define MAXN 100005

string gcd_lcm(ll a, ll b)
{
	if(a > b)
	{
		ll A = a;
		ll B = b;
		ll c;
		while( b!=0)
		{
			c = b; 
			b = a % b;
			a = c;
		}
		stringstream s; 
		s << a;
		s << " ";
		s << A/a*B;
		s << "\n";
		return s.str();
	}
	else
	{
		return gcd_lcm(b, a);
	}
}

int main() 
{
	ll a, b;
	string out;
	while(cin >> a >> b)
	{
		out += gcd_lcm(a, b);
	}
	cout << out;
	return 0;
}