import java.io.BufferedReader;
import java.io.InputStreamReader;

public class FadiAndLCM {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));			
			long x = Long.parseLong(br.readLine());
			if (x <= 5 || esPrimo(x) || x == 9) {
				System.out.println("1 " + x);
			}else if(x%2 == 0) {
				long impar = desc(x);
				long otro = x/impar;
				System.out.println(impar + " " + otro);
			}else{ 				
				long a = 2;
				long b = 3;
				while(a*b != x) {
					b++;
					if(b>x/2) {
						a++;
						b = a+1;
					}
				}			
				System.out.println(a + " " + b);				
			}
		} catch (Exception e) {
		}
	}
	
	public static long desc(long x) {
		while(x%2 == 0) {
			x /= 2;
		}
		return x;
	}
	
	
//	public static int[] parejaGanadora(ArrayList parejas) {
//		int [] parejaMenor = (int[])parejas.get(0);
//		for(int i=1; i<parejas.size(); i++) {
//			int []p = (int[])parejas.get(i);
//			if(p[1] < parejaMenor[1]) {
//				parejaMenor = p;
//			}			
//		}
//		return parejaMenor;		
//	}
	
	public static boolean esPrimo(long n) {
		if(n%2 == 0) {
			return false;			
		}else {
			for(long i=3; i<Math.sqrt(n); i+=2) {
				if(n%i == 0) {
					return false;
				}
			}
			return true;
		}
	}	
}

		 			 	   	  		 			 				    		