import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class C {
    static long gcd(long a, long b) {
        while (b > 0) {
            long temp = b;
            b = a%b;
            a = temp;
        }
        return a;
    }

    static long lcm(long a, long b) {
        return (a*b) / gcd(a, b);
    }

    static void solve() throws Exception {
        long x = scanLong();
        long a = 1;
        long b = x;
        for (long i = 2; i*i < x; i++) {
            if (x%i == 0 && lcm(x/i, i) == x) {
                a = i;
                b = x/i;
            }
        }
        out.printf("%d %d\n", a, b);
    }

    static int scanInt() throws IOException {
        return parseInt(scanString());
    }

    static long scanLong() throws IOException {
        return parseLong(scanString());
    }

    static String scanString() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    public static void main(String[] args) {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            int tc = 1;
            for (int caseno = 1; caseno <= tc; caseno++) {
                solve();
            }
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            exit(1);
        }
    }
}