package yukicoder; import java.util.Scanner; public class N414 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); long M=sc.nextLong(); int end=0; long ans1=1; long ans2=M; if(M%2==0){ans1=2;ans2=M/2;} else { for(int i=3;i<=(int)Math.sqrt((double)M);i+=2) { if(M%i==0){ans1=i;ans2=M/i;break;} } } System.out.println(ans1+" "+ans2); } }