import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.ArrayList;

public class Main
{
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                solve();
            }
        }, "1", 1 << 26).start();
    }
    static void solve () {
        FastReader fr =new FastReader();    PrintWriter op =new PrintWriter(System.out);
 
        long X =fr.nextLong() ,x =X ,i ,j ,k ,l ,ans[] =new long[2] ,dp[][] ;   ArrayList<Long> al =new ArrayList<>() ;    int itr ,lvl ,itr_ ;
        
        if (x==1l)  op.print("1 1") ;
        else {
            if ((x&1l) == 0l) {
                j =1l ; while ((x&1l) == 0l)    {   x>>=1 ;     j*=2l ;     }   al.add(j) ;
            }
            for (i =3l ; i<=(long)Math.sqrt(x) ; i+=2l) {
                if (x%i == 0l) {
                    j =1l ; while (x%i == 0l)    {   x/=i ;     j*=i ;     }   al.add(j) ;
                }
            }
            if (x!=1l)  al.add(x) ; dp =new long[2][al.size()] ;   lvl =1 ; ans[0] =Long.MAX_VALUE ;
            
            for (itr =0 ; itr<al.size() ; ++itr) {   
                dp[0][itr] =al.get(itr) ;   i =dp[0][itr] ; j =Math.max(i , X/i) ;
                if (ans[0] > j) {   ans[0] =j ; ans[1] =i ; }
            }
            while (++lvl <= al.size()) {
                for (itr_ =0 ; itr_<al.size() ; ++itr_) {
                    i =-1l ;    j =Long.MAX_VALUE ;

                    for (itr =0 ; itr<al.size() ; ++itr) {
                        if (dp[0][itr] == -1l)   continue ; if (dp[0][itr]%al.get(itr_) == 0)    continue;
                        k =al.get(itr_)*dp[0][itr] ;   l =Math.max(k , X/k) ;
                        if (l<j)   {   j =l ; i =k ;   }
                    }
                    dp[1][itr_] =i ;    if (ans[0] > j) {   ans[0] =j ; ans[1] =i ; }
                }
                for (itr_ =0 ; itr_<al.size() ; ++itr_) dp[0][itr_] =dp[1][itr_] ;
            }
            op.println(ans[1]+" "+X/ans[1]) ;
        }        
        op.flush();    op.close();
    }
    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();
        }

        String nextLine() {
            String str ="";

            try
            {
                str =br.readLine();
            }
            catch(IOException e)
            {
                e.printStackTrace();
            }

            return str;
        }

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

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