import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); long m=sc.nextLong(),i; sc.close(); for(i=2;i<=(long)Math.sqrt(m);++i)if(1>m%i)break; if(i>(long)Math.sqrt(m))System.out.print("1 "+m); else System.out.print(m/i+" "+m/(m/i)); } }