import java.util.Scanner;

public class ProblemC {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int x = input.nextInt();
		int diff=x-1;
		int a = 1, b =x;
		for(int i=2;i<=x/2;i++)
		{
			if(x%i==0)
			{
				int second = x/i;
				if(max(second,i)<max(a,b) && second!=i)
				{a = i;
				b = second;}
			}
		}
		if(a>b)
			System.out.println(b+" "+a);
		else
			System.out.println(a+" "+b);

	}

	private static int max(int second, int i) {
if(second>i)
	return second;
else
	return i;
	}

}
