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);
        int a = (int) gen;
        if (a * a == x) {
            System.out.println(a + " " + a);
        } else {
            int b = a + 1;
            if (a * b == x) {
                System.out.println(a + " " + b);
            } else {
                for (; ; ) {
                    if (x % b != 0) {
                        b++;
                    } else {
                        a = (int) x / b;
                        if (a*( b /gcd(a,b))==x){
                            System.out.println(a + " " + b);
                            break;
                        }else {
                            b++;
                        }
                    }
                }
            }
        }
    }
    public static int gcd(int num1, int num2) {
        if (num1%num2==0){
            return num2;
        }else {
            return gcd(num2,num1%num2);
        }
    }
}
 			  				 			 			 			   			