import java.util.*; public class Main { public static void main (String[] args) throws Exception { Scanner sc = new Scanner(System.in); long m = sc.nextLong(); for (long i = 2; i <= Math.sqrt(m); i++) { if (m % i == 0) { System.out.println(i + " " + (m / i)); return; } } System.out.println(1 + " " + m); } }