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.TreeMap;
import java.util.StringTokenizer;
import java.util.Map;
import java.util.Map.Entry;
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 F;
        private long[] factors;
        private TreeMap<Long, Long> map = new TreeMap<Long, Long>();
        
        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            long n = N = in.nextLong();
            if (n == 1) {
                out.println("1 1");
                return;
            }
            if (n == 2) {
                out.println("1 2");
                return;
            }
            
            
            long num = n;
            for (long i = 2; i * i <= num; i++) {
                long factor = 1;
                while (num % i == 0) {
                    factor *= i;
                    num /= i;
                }
                if (factor > 1) {
                    map.put(i, factor);
                }
            }
            if (num > 1) {
                map.put(num, num);
            }
            if (map.size() == 1) {
                out.println(1 + " " + map.firstEntry().getValue());
                return;
            }
            
            F = map.size();
            factors = new long[F];
            
            int pos = 0;
            for (Map.Entry<Long, Long> entry : map.entrySet()) {
                factors[pos++] = entry.getValue();
            }
            
            long A = go(0, 1);
            long B = N / A;
            out.println(Math.min(A, B) + " " + Math.max(A, B));
        }
        
        private long go(int pos, long prod) {
            if (pos == F) {
                long a = prod;
                long b = N / prod;
                return Math.max(a, b);
            }
            long m1 = go(pos + 1, prod * factors[pos]);
            long m2 = go(pos + 1, prod);
            return Math.min(m1, m2);
        }
        
    }
    
    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());
        }
        
    }
}

