#include "bits/stdc++.h" using namespace std; //諸機能 #pragma region MACRO #define putans(x) std::cerr << "answer: " ; cout << (x) << endl #define dputans(x) std::cerr << "answer: "; cout << setprecision(10) << (double)(x) << endl #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define RREP(i,a,n) for(int i=(int)(n-1); i>= a; i--) #define rep(i,n) REP(i,0,n) #define rrep(i,n) RREP(i,0,n) #define all(a) begin((a)),end((a)) #define mp make_pair #define exist(container, n) ((container).find((n)) != (container).end()) #define substr(s,i,l) string((s), (i), (l)) #define tos(x) (to_string((x))) #ifdef _DEBUG //ファイルからテストデータを読み込む std::ifstream ifs("data.txt"); #define put ifs >> #else //いい感じにやる #define put cin >> #endif #pragma endregion //デバッグなどの支援 #pragma region CODING_SUPPORT #define dbg(var0) { std::cerr << ( #var0 ) << "=" << ( var0 ) << endl; } #define dbg2(var0, var1) { std::cerr << ( #var0 ) << "=" << ( var0 ) << ", "; dbg(var1); } #define dbg3(var0, var1, var2) { std::cerr << ( #var0 ) << "=" << ( var0 ) << ", "; dbg2(var1, var2); } #define dbgArray(a,n) {std::cerr << (#a) << "="; rep(i,n){std::cerr <<(a[i])<<",";} cerr< pii; typedef pair pss; typedef pairpis; typedef vector vs; typedef vector vi; #pragma endregion //諸々の定数(書き換える可能性ある) #pragma region CONST_VAL #define PI (2*acos(0.0)) #define EPS (1e-9) #define MOD (ll)(1e9 + 7) #define INF (ll)(1e9) #pragma endregion //vector split(const string& input, char delimiter) { // istringstream stream(input); string field; vector result; // while (getline(stream, field, delimiter))result.push_back(field); // return result; //} int main() { ll m; put m; ll a, b; a = 2, b = 1000001; bool up = false; bool find = false; while (a <= b) { if (a*b > m) up = false; else if (a*b == m) { find = true; goto END; } else up = true; if (up) a++; else b--; } END: if (find) { putans(to_string(a) + " " + to_string(b)); } else { putans("1 " + to_string(m)); } return 0; } //おばかちん //string from = "hamu"; //string to = "1"; //str = allReplace(str, from, to); //from = "ham"; //to = "0"; //str = allReplace(str, from, to); //int x = 0; //int bin = 1; //RREP(i, 0, str.size()) { // if (str[i] == '1') x += bin; // bin *= 2; //}