import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long r = 1; for(long t=2; t*t<=N ; t++){ if(N % t == 0){ r = t; break; } } long ans = N / r; System.out.println(ans+" "+r); } }