import java.util.Scanner;

public class fadiAndLCM {
	static int gcd(int i, int j) {
		if (i == 0)
			return j;
		if (j == 0)
			return i;
		if (i > j)
			return gcd(i % j, j);
		else
			return gcd(i, j % i);
	}

	static int lcm(int i, int j) {
		return (i / gcd(i, j)) * j;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
//		for (int x = 2; x <= 100; x++) {
		int minAns = Integer.MAX_VALUE;
		int maxAns = 0;
		for (int i = 1; i <= Math.sqrt(x); i++) {
			if (x % i == 0) {
				int j = x / i;
				if (x % j == 0) {
					int temp = Integer.max(i, j);
					if (minAns > temp) {
						minAns = temp;
						maxAns = Integer.min(i, j);
					}
				}
			}
		}
//			if (minAns * maxAns != x)
		System.out.println(maxAns + " " + minAns);
		sc.close();
	}
}
