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