import java.io.*;
import java.util.*;
import java.math.*;
     
public class Main{
	public static void main(String[] args) throws Exception {
	IO io = new IO();
	PrintWriter out = new PrintWriter(System.out);
	Solver sr = new Solver();
	sr.solve(io,out);
	out.flush();
	out.close();
    	}

	static class Solver
	{
	    long gcd(long a, long b)
	    {
	        if(b==0)
	            return a;
	       return gcd(b,a%b);
	    }
	    void solve(IO io, PrintWriter out)
	    {
	        int i, j;
           long n = io.nextLong();
           long min=Long.MAX_VALUE, a=0, b=0;
           for(i=1 ; i<=(int)Math.sqrt(n) ; i++)
           {
               if(n%i==0)
               {
                   if(gcd(i,n/i)==1)
                   {
                       if(min>Math.max(i,n/i)){
                           min=Math.max(i,n/i);
                           a=i;
                           b=n/i;
                           //out.println(i+"^"+(n/i));
                       }
                   }
                   //out.println(i+" "+(n/i));
               }
           }
           out.print(a+" "+b);
	    }
	}
	//Special thanks to Petr (on codeforces) who inspired me to implement IO class!
	static class IO
	{
    	BufferedReader reader;
        StringTokenizer tokenizer;
    	public IO() {
                reader = new BufferedReader(new InputStreamReader(System.in));
                tokenizer = null;
            }
     
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine() {
            String s="";
            try {
                    s=reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    
        public long nextLong() {
            return Long.parseLong(next());
        }
    	double nextDouble()
    	{
    		return Double.parseDouble(next());
    	}
	}
}