import java.io.*;
import java.util.*;
public class code {

	public static void main(String[] args) throws Exception {
		Scanner sc= new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		long x=sc.nextInt();
		int n= (int)Math.ceil(Math.sqrt(x));
		for(int i=n; i>=1; i--) {
			if(x%i==0 && 1l*i*i!=x) {
				pw.println(i+" "+x/i);
				break;
			}
		}
		pw.close();
	}
 
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
 
		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public int[] nextArr(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < arr.length; i++)
				arr[i] = nextInt();
			return arr;
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}