//Õâ¸öcÐ´³öÀ´µÄ³ÌÐòÎªÉ¶Ö»ÄÜ¹ýÒ»°ëÄØ
#include<iostream>
#include<cstdio>
using namespace std;
long long gcd(long long m,long long n){
	return m==0?n:gcd(n%m,m);
}
int gcd(int a,int b){
	return a==0?b:gcd(b%a,a);
}
long long lcm(long long a,long long b){
	return a/gcd(a,b)*b;            //Á½ÊýÏà³Ë³ýÒÔ×î´ó¹«±¶Êý 
}
int main()
{
	int a,b;
	while(~scanf("%d%d",&a,&b)){
		printf("%d ",gcd(a,b));
		printf("%lld\n",lcm(a,b));     //long longµÄÊä³ö¸ñÊ½·û£¬very important 
	}
	
	return 0;
 } 
