

import java.util.*;
import java.io.*;
import java.math.*;
 
public class A {
 
    public static void main(String[] args) throws Exception {
        // FileInputStream inputStream = new FileInputStream("input.txt");
        // FileOutputStream outputStream = new FileOutputStream("output.txt");
 
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
         
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
 
        Solver solver = new Solver();     
        // int t = in.nextInt();
        int t = 1;
        for (int i = 0 ; i < t ; i++) {
            solver.solve(1, in, out);
        }
                 
        out.close();
    }
 
    static class Solver {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long n = in.nextLong();
            long i = 1;
            long res = Long.MAX_VALUE;
            while (i * i <= n) {
                if (n % i == 0) {
                    long o = n / i;
                    if (i != o) {
                        long max = Math.max(o, i);
                        res = Math.min(res, max);
                    }
                }
                i += 1L;
            }
            if (res == Long.MAX_VALUE) res = 1;
            out.println(res + " " + (n / res));
        }


    }

    
             
 
    static class InputReader {
 
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
 
        public int nextInt() {
            return Integer.parseInt(next());
        }
 
        public long nextLong() {
            return Long.parseLong(next());
        }
 
        public double nextDouble() {
            return Double.parseDouble(next());
        }
 
        public float nextFloat() {
            return Float.parseFloat(next());
        }
    }
}