

    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class test
    {
        public static void main(String args[])
        {
            Scanner sc = new Scanner(System.in);
            long x=sc.nextLong();
            long i=(long)Math.sqrt(x);
            if(i*i==x)
            {
                i=i-1;
            }
            for(;i>=1;i--)
            {
                if(x%i==0)
                {
                    System.out.println(i+" "+ (x/i));
                    break;
                }
            }
        }
    }