import java.util.*;
import java.io.*;

public class File {
    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }

            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
	
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
		
		
		
		long X = sc.nextLong();		
		
		if (X == 1) {
			out.println("1 1");
		}
		else {
			List<long[]> primes = getPrimes(X);
			
			if (primes.size() == 1) {
				out.println("1 " + X);
			}
			else {
				long[] minMax = new long[] {X};
				
				backtrack(primes, 0, 1, minMax, X);
			    
				out.println(minMax[0] + " " + (X / minMax[0]));
			}
		}
		
		
		
		out.close();
	}	
	
	public static void backtrack(List<long[]> primes, int index, long curr, long[] res, long X) {
		if (index == primes.size()) {
			long p2 = X / curr;
			res[0] = Math.min(res[0], Math.max(curr, p2));
			return;
		}
		
		long[] pair = primes.get(index);
		
		backtrack(primes, index + 1, curr * (long)Math.pow(pair[0], pair[1]), res, X);
		backtrack(primes, index + 1, curr, res, X);
	}
	
	public static List<long[]> getPrimes(long num) {
		List<long[]> list = new ArrayList();
		
		if (num % 2 == 0) {
			long pow = 0;
			
			while (num % 2 == 0) {
				num /= 2;
				pow++;
			}
			
			list.add(new long[] {2, pow});
		}
		
		long d = 3;
		
		while (d * d <= num) {
			if (num % d == 0) {
				long pow = 0;
				
				while (num % d == 0) {
					num /= d;
					pow++;					
				}
				
				list.add(new long[] {d, pow});
			}
			
			d++;
		}
		
		if (num > 1) {
			list.add(new long[] {num, 1});
		}
		
		return list;
	}
}












	