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 (a.multiply(b).compareTo(x)< 0) {
                       b= b.add(BigDecimal.valueOf(1));
                    } else if (a.multiply(b).compareTo(x)>0) {
                       a= a.subtract(BigDecimal.valueOf(1));
                    } else {
                        System.out.println(a + " " + b);
                        break;
                    }
                }
            }
        }
    }
    public static BigDecimal sqrt(BigDecimal value){
        int t = 100;
        MathContext m = new MathContext(t, RoundingMode.HALF_UP);
        BigDecimal result = value;
        int i = 0;
        while (i < t) {
            result = (result.add(value.divide(result, m))).divide(BigDecimal.valueOf(2), m);
            i++;
        }
        return result;
    }
}
  				      	 	 	          		 	