import java.io.*;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class round {
    FastScanner in;
    PrintWriter out;
    private void solve() throws IOException {
        long x=in.nextLong();
        long x1=x;
        long [] p=new long[40];
        int now=0;
        for (long i = 2; i <=Math.sqrt(x) ; i++) {
            while(x%i==0){
                x=x/i;
                p[now]=i;
                now++;
            }
        }
        TreeSet<Long> s=new TreeSet<>();
        now=0;
        while(p[now]!=0){
            long y=p[now];
            while(p[now]==p[now+1]){
               y=y*p[now];
               now++;
            }
            s.add(y);
            now++;
        }
        long min=(long)10e12;
        Long [] m=s.toArray(new Long [s.size()]);
        for (int i= 0; i <(int)Math.pow(2,m.length) ; i++) {
            long c=1;
            int count=0;
            long h=i;
            while(h>0){
                if(h%2==1){
                    c=c*m[count];
                }
                h=h/2;
                count++;
            }
            long res=Math.max(c,x1/c);
            if(min>res){
                min=res;
            }
        }
        out.println(Math.min(min,x1/min)+" "+Math.max(min,x1/min));
    }
    class FastScanner {
        StringTokenizer st;
        BufferedReader br;
        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }
        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        boolean hasNext() throws IOException {
            return br.ready() || (st != null && st.hasMoreTokens());
        }
        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        String nextLine() throws IOException {
            return br.readLine();
        }
        boolean hasNextLine() throws IOException {
            return br.ready();
        }
    }
    private void run() throws IOException {
        in = new FastScanner(System.in);
// new FastScanner(new FileInputStream(".in"));
        out = new PrintWriter(System.out);
// new PrintWriter(new FileOutputStream(".out"));

        solve();
        out.flush();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new round().run();
    }
}
