

import java.util.Scanner;

public class  Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int n = x/2;
		if(x == 1) {
			System.out.println(1+" "+1);
		}else {
		if(x%n==0&&n%2!=0) {
			System.out.println(2+" "+n);
		}else {
			for(int i=n;i>0;i--) {
				if(x%i==0&&x%(x/i)==0&&i%(x/i)!=0)
					if(x/i<i)
					System.out.println(x/i+" "+i);
					else
						System.out.println(i+" "+x/i);
			}
		}
		}
	}
}
