#include<stdio.h>
int main(void)
{
	int a,b,aa,ba,i,x,y,bb;
	aa=1;
	ba=1;
	while(scanf("%d %d",&a,&b)!=EOF){
		x=a;
		y=b;
		if(b<a){
			while(1){
				if(aa==0){
					break;
				}
				aa=a%b;
				a=b;
				b=aa;
			}
			ba=x*y/a;
			printf("%d %d\n",a,ba);
		}
		else{
			while(1){
				if(aa==0){
					break;
				}
				aa=b%a;
				b=a;
				a=aa;
			}
			ba=x*y/b;
			printf("%d %d\n",b,ba);
		}
	}
}
	