import java.util.*; public class Main { public static void main (String[] args) { 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); } }