#include using namespace std; typedef vector VI; typedef vector VS; //container util #define SORT(c) sort((c).begin(),(c).end()) //repetition #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(void){ int C; cin >> C; FOR(i,2,C+1){ if(C % i == 0){ cout << i << " " << C / i << endl; break; } } return 0; }