//package com.company;
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner s = new Scanner(System.in);
//   B
long x=s.nextLong();
long a=(long)Math.sqrt(x);int flag=0;
for(long i=a;i<=x/2;i++){
    if(x%i==0){flag=1;
        System.out.println(i+" "+(x/i));break;
    }
}if(flag==0) {
            System.out.println(x+" "+1);
        }
    }
}
