#include <iostream>
using namespace std;
int LCM(int a, int b);
long GCD(int a, int b, int ans1);

int main(){
    int a,b;
    while(cin >> a >> b){
        int ans1 = LCM(a,b);
        long ans2 = GCD(a,b,ans1);
        cout << ans1 << " " << ans2 << endl;
    }
}

int LCM(int a, int b){
    while(1){
        if(a % b == 0) break;
        b = a % b;
        a = b;
    }
    
    return b;
}

long GCD(int a, int b, int ans1){
    double ans = a * b / ans1;
    return (long)ans;
}
