import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigDecimal x = sc.nextBigDecimal();
        BigDecimal gen = sqrt(x);
        BigDecimal a = gen.setScale(0,RoundingMode.DOWN);
        if (a.pow(2).compareTo(x)==0) {
            System.out.println(a + " " + a);
        } else {
            BigDecimal b = a.add(BigDecimal.valueOf(1));
            if (a.multiply(b).compareTo(x)== 0) {
                System.out.println(a + " " + b);
            } else {
                for (; ; ) {
                    if (x.divideAndRemainder(b)[1].compareTo(BigDecimal.valueOf(0))!=0) {
                        b= b.add(BigDecimal.valueOf(1));
                    } else {
                        a=x.divide(b,0,RoundingMode.UNNECESSARY);
                        System.out.println(a + " " + b);
                        break;
                    }
                }
            }
        }
    }
    public static BigDecimal sqrt(BigDecimal value){
        int pr=100;
        MathContext m = new MathContext(pr, RoundingMode.HALF_UP);
        BigDecimal result = value;
        for (int i=0;i<pr;i++) {
            result = (result.add(value.divide(result, m))).divide(BigDecimal.valueOf(2), m);
        }
        return result;
    }
}
   	  					  			 		  	   		 		