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