import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble();
        double gen = Math.sqrt(x);
        double xf = -x;
        int a = (int) gen;
        if (x >= 0) {
            for (; ; ) {
                if (x == 0) {
                    System.out.println(0 + " " + 0);
                    break;
                }
                if (x % a == 0 && gcd(a, (int) (x / a)) == 1) {
                    System.out.println(a + " " + (int) (x / a));
                    break;
                }
                a--;
            }
        } else {
            int b = (int) Math.sqrt(-x);
            for (; ; ) {
                if (xf % b == 0 && gcd(b, (int) (xf / b)) == 1) {
                    int other = (int) (xf / b);
                    if (other >= b) {
                        other = -other;
                    } else {
                        b = -b;
                    }
                    System.out.println(b + " " + other);
                    break;
                }
                b--;
            }
        }
    }
    public static int gcd(int num1, int num2) {
        if (num1 % num2 == 0) {
            return num2;
        } else {
            return gcd(num2, num1 % num2);
        }
    }
}
 			   		    	 			  		 		  			