import java.io.BufferedReader;
import java.io.InputStreamReader;

public class FadiAndLCM {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));			
			long x = Long.parseLong(br.readLine());
			long a = x;
			long b = 1;
			if (x%2 == 0) {
				a = x/2;
				b = x/a;
			}
			System.out.println(a + " " + b);
		} catch (Exception e) {
		}
	}
	
//	public static boolean divisible(long a, long b, long x) {
//		if (x%a == 0 && x%b == 0) {
//			return true;
//		}else {
//			return false;
//		}
//	}
	
}

					 	 	 		    		 			     	 	