#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; int gcd=__gcd(a,b);//最大公因数 int lcm=a/gcd*b; cout<<gcd<<" "<<lcm; }