import java.util.*;
import java.io.*;

public class Main {
    // For fast input output
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            try {
                br = new BufferedReader(new FileReader("input.txt"));
                PrintStream out = new PrintStream(new FileOutputStream("output.txt"));
                System.setOut(out);
            } catch (Exception e) {
                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;
        }
    }
    static void addtomap(HashMap<Long, Long> map, long a)
    {
        if(map.containsKey(a))
        {
            long b = map.get(a);
            map.put(a, b+1);
        }
        else
        {
            map.put(a, (long) 1);
        }
    }
    static void generate(HashMap<Long, Long> map, HashMap<Long, Long> factors, ArrayList<Long> list, int index, long num, long x)
    {
        if(index==list.size())
        {
            map.put(num, x/num);
            return;
        }
        long newnum = num * (long) Math.pow(list.get(index), factors.get(list.get(index)));
        generate(map, factors, list, index+1, newnum, x);
        generate(map, factors, list, index+1, num, x);
    }
    // end of fast i/o code
    public static void main(String[] args) {
        FastReader reader = new FastReader();
        long x = reader.nextLong();
        if(x==1)
        {
            System.out.println(1+" "+1);
            return;
        }
        long num = x;
        HashMap<Long, Long> factors = new HashMap<>();
        while(x%2==0)
        {
            addtomap(factors, 2);
            x = x>>1;
        } 
        for(long i=3; i*i<=x; i+=2)
        {
            while(x%i==0)
            {
                addtomap(factors, i);
                x /= i;
            }
        }
        factors.put((long)1, (long) 1);
        if(x>2)
            factors.put(x, (long) 1);
        ArrayList<Long> list = new ArrayList<>(factors.keySet());
        Collections.sort(list);
        HashMap<Long, Long> cases = new HashMap<>();
        generate(cases, factors, list, 0, (long) 1, num);
        //System.out.println(cases);
        long ansa, ansb;
        ansa = ansb = Long.MAX_VALUE;
        for(Map.Entry<Long, Long> el: cases.entrySet())
        {
            if(Math.max(el.getKey(), el.getValue()) < Math.max(ansa, ansb))
            {
                ansa = el.getKey();
                ansb = el.getValue();
            }
        }
        System.out.println(ansa+" "+ansb);
        //System.out.println(list);
        // for(long i: list)
        // {
        //     long mul = (long) Math.pow(i, factors.get(i));
        //     a *= mul;
        //     b /= mul;
        //     //System.out.println("a: "+a+"b: "+b);
        //     if(a>b)
        //     {
        //         long diff1 = Math.abs((a/mul)-(b*mul));
        //         long diff2 = Math.abs(b-a);
        //         if(diff1<diff2)
        //         {
        //             System.out.println((a/mul)+" "+(b*mul));
        //             return;
        //         }
        //         else 
        //         {
        //            System.out.println(b+" "+a);
        //            return;
        //         }
        //     }
        // }
        // for(Map.Entry<Long, Long> entry: factors.entrySet())
        // {
        //     long mul = entry.getKey()*entry.getValue();;
        //     a *= mul;
        //     b /= mul;
        //     if(a>b)
        //     {
        //         System.out.println((a/mul)+" "+(b*mul));
        //         return;
        //     }
        // }
    }
}