import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean[] b = new boolean[1000000]; b[0] = true; b[1] = true; for(int i = 2; i < 1000; i++){ if(!b[i]){ for(int j = i*i; j < 100000; j+=i){ b[j] = true; } } } long n = sc.nextLong(); if(n < 1000000 && !b[(int)n]){ System.out.println(1 + " " + n); } else if(n%2 == 0){ System.out.println(2 + " " + n/2); } else { for(int i = 3; i < 1000000; i+=2){ if(!b[i] && n%i == 0){ System.out.println(i + " " + n/i); return; } } System.out.println(1 + " " + n); } } }