import java.io.*;
import java.util.*;
public class Main {
	static long gcd(long a,long b) {
		if(a==0) return b;
		return gcd(b%a,a);
	}
	static long lcm(long a, long b) {
		return a*b/gcd(a,b);
	}
	public static void main(String[] args) throws IOException 
	{ 
		FastScanner f = new FastScanner(); 
		int ttt=1;
//		ttt=f.nextInt();
		PrintWriter out=new PrintWriter(System.out);
		for(int tt=0;tt<ttt;tt++) {
			long n=f.nextLong();
			long mx=Long.MAX_VALUE;
			long ansa=1;
			long ansb=1;
			for(int i=1;i<=Math.sqrt(n)+50;i++) {
				if(n%i==0 && lcm(i,n/i)==n) {
					long a=i;
					long b=n/i;
					if(mx>Math.max(a, b)) {
						ansa=a;
						ansb=b;
					}
					mx=Math.min(mx, Math.max(a, b));
				}
			}
			System.out.println(ansa+" "+ansb);
		}
		out.close();
	} 
	static void sort(int[] p) {
        ArrayList<Integer> q = new ArrayList<>();
        for (int i: p) q.add( i);
        Collections.sort(q);
        for (int i = 0; i < p.length; i++) p[i] = q.get(i);
    }
    
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
		long[] readLongArray(int n) {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}
	}
} 	