#include #include<math.h> using namespace std;

int main() { long long n; long long i, j; cin >> n; i = 1, j = n; if (n == 1) { cout << '1' << " " << '1'; return 0; } if (n == 2) { cout << '1' << " " << '2'; return 0; } long long a=10000000, b=0; for (i = 1; i <= n; i++) { for (j = n; j >= 1; j--) { if (i * j == n) { if (sqrt(pow(a - b, 2)) < sqrt(pow(i - j, 2))) { if (a > b) { int temp = a; a = b; b = temp; } cout << a << " " << b; return 0; } a = i; b = j;

        }
    }
     
}

}