#include <iostream>
using namespace std;
int main() {
int k,l,m;
cin >> k >> l >> m;
if (k>0){
if (l>0){
if (m>0){
if ((k%m==0)||(m%k==0))
cout << k << " " << m << endl;
if ((k%l==0)||(l%k==0))
cout << k << " " << l << endl;
if ((l%m==0)||(m%l==0))
cout << l << " " << m << endl;
}
else if ((k%l==0)||(l%k==0))
cout << k << " " << l << endl;
}
else if ((m>0) && ((m%k==0)||(k%m==0)))
cout << m << " " << k << endl;
}
else if ((l>0) && (m>0) && ((l%m==0)||(m%l==0)))
cout << l << " " << m << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgayxsLG07CgljaW4gPj4gayA+PiBsID4+IG07CglpZiAoaz4wKXsKCQlpZiAobD4wKXsKCQkJaWYgKG0+MCl7CgkJCQlpZiAoKGslbT09MCl8fChtJWs9PTApKSAKCQkJCQljb3V0IDw8IGsgPDwgIiAiIDw8IG0gPDwgZW5kbDsKCQkJCWlmICgoayVsPT0wKXx8KGwlaz09MCkpIAoJCQkJCWNvdXQgPDwgayA8PCAiICIgPDwgbCA8PCBlbmRsOwoJCQkJaWYgKChsJW09PTApfHwobSVsPT0wKSkgCgkJCQkJY291dCA8PCBsIDw8ICIgIiA8PCBtIDw8IGVuZGw7CgkJCX0KCQkJZWxzZSBpZiAoKGslbD09MCl8fChsJWs9PTApKSAKCQkJCQljb3V0IDw8IGsgPDwgIiAiIDw8IGwgPDwgZW5kbDsKCQl9CgkJZWxzZSBpZiAoKG0+MCkgJiYgKChtJWs9PTApfHwoayVtPT0wKSkpIAoJCQkJY291dCA8PCBtIDw8ICIgIiA8PCBrIDw8IGVuZGw7Cgl9CgllbHNlIGlmICgobD4wKSAmJiAobT4wKSAmJiAoKGwlbT09MCl8fChtJWw9PTApKSkgCgkJCWNvdXQgPDwgbCA8PCAiICIgPDwgbSA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=