import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.function.IntConsumer;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC(in, out);
        try {
            solver.solve();
        } catch (ExitException ignored) {
        }
        out.close();
    }

    static class TaskC {
        FastScanner sc;
        PrintWriter out;

        public TaskC(FastScanner sc, PrintWriter out) {
            this.sc = sc;
            this.out = out;
        }

        public void solve() {
            times(1, this::solve);
        }

        public void solve(int time) {
            long x = sc.nextLong();

            long n = x;
            LongArray primes = new LongArray();
            for (long i = 2; i * i <= n; i++) {
                long prime = 1;
                while (n % (prime * i) == 0) {
                    prime *= i;
                }
                if (prime > 1) {
                    n /= prime;
                    primes.add(prime);
                }
            }
            if (n > 1) primes.add(n);

            long ans = 1;
            for (long i = 2; i * i <= x; i++) {
                long m = i;
                long[] array = primes.array;
                for (int j = 0, arrayLength = primes.size; j < arrayLength; j++) {
                    long prime = array[j];
                    if (m % prime == 0) m /= prime;
                }
                if (m == 1) ans = i;
            }
            answer(ans + " " + x / ans);
        }

        private void answer(Object ans) {
            out.println(ans);
            throw new ExitException();
        }

        private void times(int n, IntConsumer consumer) {
            for (int i = 0; i < n; i++) {
                try {
                    consumer.accept(i);
                } catch (ExitException ignored) {
                }
            }
        }

    }

    static class ExitException extends RuntimeException {
    }

    static class LongArray {
        public long[] array;
        public int size;

        public LongArray() {
            this(10);
        }

        public LongArray(int capacity) {
            capacity = Math.max(capacity, 10);
            this.array = new long[capacity];
        }

        public void add(long n) {
            ensureCapacity(size + 1);
            array[size++] = n;
        }

        private void ensureCapacity(int cap) {
            if (cap > array.length) grow();
        }

        private void grow() {
            int oldCapacity = array.length;
            int newCapacity = oldCapacity + (oldCapacity >> 1);
            array = Arrays.copyOf(array, newCapacity);
        }

    }

    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

    }
}

