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);
        }
    }
    // 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);
        long a,b;  
        //System.out.println(factors);
        a =1; b=num;
        ArrayList<Long> list = new ArrayList<>(factors.keySet());
        Collections.sort(list);
        //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;
        //     }
        // }
    }
}