import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class Graph {
    public static void main(String[] args) throws IOException {
        FastReader sc = new FastReader();
        long x=sc.nextLong();
        ArrayList<Long> fact=fact(x);
        Collections.sort(fact);
        long a=-1,b=-1;
        for (int i=0;i<fact.size()-1;i++){
            long aa=fact.get(i),bb=fact.get(i+1);
            long gcd=gcd(aa,bb);
            if ((aa/gcd)*(bb/gcd)==x){
                a=aa;b=bb;
                break;
            }
        }
        if (a==-1) System.out.println(1+" "+x);
        else System.out.println(a+" "+b);
    }
    static long gcd(long a,long b){
        if (a==0)return b;
        return gcd(b%a,a);
    }
    static ArrayList<Long> fact(long x){
        ArrayList<Long> arr=new ArrayList<>();
        for (long i=2;i*i<=x;i++){
            if (x%i==0){
                arr.add(x/i);
                if (x/i!=i){
                    arr.add(i);
                }
            }
        }
        return arr;
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}