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