
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		
		if(n==1)
			System.out.println("1 1");
		else if(n==2)
			System.out.println("1 2");
		else if(n==3)
			System.out.println("1 3");
		else
			System.out.println((long)Math.sqrt(n)-1 + " " + n/((long)(Math.sqrt(n))-1));
	}
}
