import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.util.Hashtable;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long X = in.nextLong();
            Hashtable<Long, Integer> primeFact = MathUtils.primeFactorization(X);
            long a = 1, b = X;
            ArrayList<Long> numbers = new ArrayList<>();
            for (long key : primeFact.keySet()) {
                long val = primeFact.get(key);
                long pow = (long) Math.pow(key, val);
                numbers.add(pow);
            }
            int N = numbers.size();
            for (int i = (1 << N) - 1; i >= 0; i--) {
                String s = Long.toString(i, 2);
                while (s.length() < N) {
                    s = "0" + s;
                }
                long x = 1, y = 1;
                for (int j = 0; j < N; j++) {
                    if (s.charAt(j) == '0') {
                        x *= numbers.get(j);
                    } else {
                        y *= numbers.get(j);
                    }
                }
                if (x * y == X && Math.max(x, y) < Math.max(a, b)) {
                    a = x;
                    b = y;
                }
            }

            out.printLine(a + " " + b);
        }

    }

    static class OutputWriter {
        PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer tokenizer = null;

        public InputReader(InputStream inputStream) {
            in = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String next() {
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                    tokenizer = new StringTokenizer(in.readLine());
                }
                return tokenizer.nextToken();
            } catch (IOException e) {
                return null;
            }
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class MathUtils {
        public static Hashtable<Long, Integer> primeFactorization(long n) {
            Hashtable<Long, Integer> table = new Hashtable<>();
            for (long i = 2; i <= n / i; i++) {
                int count = 0;
                while (n % i == 0) {
                    count++;
                    n /= i;
                }
                if (count > 0) {
                    table.put(i, count);
                }
            }
            if (n > 1) {
                table.put(n, 1);
            }
            return table;
        }

    }
}

