import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); ArrayDeque stack = new ArrayDeque<>(); for (int i = 1; i <= Math.sqrt(n); i++) { if (n % i == 0) { stack.push(n / i); int x = n / i; if ((int)(Math.sqrt(x)) * (int)(Math.sqrt(x)) == x) { System.out.println((int)(Math.sqrt(x)) + " " + i); return; } } } while (stack.size() > 0) { int i = stack.pop(); int x = n / i; if ((int)(Math.sqrt(x)) * (int)(Math.sqrt(x)) == x) { System.out.println((int)(Math.sqrt(x)) + " " + i); return; } } } }