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 {
        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            long N = in.nextLong();
            
            if (N == 1) {
                out.println("1 1");
                return;
            }
            if (N == 2) {
                out.println("1 2");
                return;
            }
            
            long result = N;
            for (long i = 2; i * i <= N; i++) {
                if (N % i == 0) {
                    long a = i;
                    long b = N / i;
                    if (lcm(a, b) == N) {
                        result = Math.min(result, Math.max(a, b));
                    }
                }
            }
            long A = result;
            long B = N / result;
            out.println(A + " " + B);
        }
        
        private long lcm(long a, long b) {
            long p = a * b;
            return p / gcd(a, b);
        }
        
        private long gcd(long a, long b) {
            return b == 0 ? a : gcd(b, a % b);
        }
        
    }
    
    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());
        }
        
    }
}

