#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int n ;
cin >> n;
for (int i = int(sqrt(n)); i > 0 ;i--)
{
if (n%i ==0 )
{
cout << i <<" " << n/i <<endl;
break;
}
}
return 0 ;
}
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n do write(a[i]:4);
readln;
end.