import java.util.Scanner;

public class FadiLCM {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long num = scanner.nextLong();
        maxLCM(num);
    }

    public static void maxLCM(long number){

        int sqrRoot = (int) Math.sqrt(number);

        for (long i = sqrRoot; i >= 1 ; i--) {

            if(number % i == 0){
                long pair = number / i;
                if(getGCD(pair, number) == 1){
                    System.out.println(number + " " + pair);
                    return;
                }
            }
        }
    }

    private static long getGCD(long pair, long number){
        return (number == 0) ? pair: getGCD(number, pair % number);
    }

}
