#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long int ll;

long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }

int main(){
	int a,b;
	while(scanf("%d %d",&a,&b)!=EOF){
		cout << GCD(a,b) << " " << a/GCD(a,b)*b << endl;
	}
}
