import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.HashSet; import java.util.Scanner; /** * 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; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(1, in, out); out.close(); } static class Task { private static HashSet primeNumbers = new HashSet<>(); private static long getMinDivisor(long n) { primeNumbers.clear(); int max = (int) Math.sqrt(n) + 1; for (int i = 2; i < max; i++) { if (!primeNumbers.contains(i)) { int cn = i; while (cn < max) { primeNumbers.add(cn); cn += i; } if (n % (long) i == 0) { return i; } } } return n; } public void solve(int testNumber, Scanner in, PrintWriter out) { long n = in.nextLong(); long d = getMinDivisor(n); out.println(d + " " + n / d); } } }