import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author zodiacLeo
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
    
    static class TaskC {
        private long N;
        private int P = 12;
        private int[] factors = new int[38];
        private int[] primes = new int[]{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37};
        
        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            N = in.nextLong();
            if (N == 1) {
                out.println("1 1");
                return;
            }
            
            long n = N;
            for (int i = 0; i < P; i++) {
                int p = primes[i];
                while (n % p == 0) {
                    factors[p] = Math.max(p, factors[p] * p);
                    n /= p;
                }
            }
            
            int f = 0;
            for (int i = 0; i < factors.length; i++) {
                if (factors[i] > 0) {
                    f++;
                }
            }
            if (f == 1) {
                out.println("1 " + N);
                return;
            }
            long b = go(0, 1);
            long a = N / b;
            
            out.println(a + " " + b);
        }
        
        private long go(int pos, long prod) {
            if (pos == P) {
                return Math.max(N / prod, prod);
            }
            long result = Long.MAX_VALUE;
            if (factors[pos] > 0) {
                result = Math.min(result, go(pos + 1, prod * 1L * factors[pos]));
            }
            result = Math.min(result, go(pos + 1, prod));
            
            return result;
        }
        
    }
    
    static class FastPrinter extends PrintWriter {
        public FastPrinter(OutputStream out) {
            super(out);
        }
        
        public FastPrinter(Writer out) {
            super(out);
        }
        
    }
    
    static class FastScanner {
        public BufferedReader br;
        public StringTokenizer st;
        
        public FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }
        
        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
        
        public String next() {
            while (st == null || !st.hasMoreElements()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null) {
                    return null;
                }
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }
        
        public long nextLong() {
            return Long.parseLong(next());
        }
        
    }
}

