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

public class Main {

    public static void main(String[] args) {
        FastReader f = new FastReader();

        boolean[] bol = new boolean[1000001];
        for(int i=2;i<=1000;i++) {
            if(!bol[i]) {
                for(int j=i+i;j<=1000000;j+=i) {
                    bol[j] = true;
                }
            }
        }

        long X = f.nextLong();

        long a = 1, b = 1;

        for(int i=2;i<=1000000 && X > 1;i++) {
            if(!bol[i]) {
                long loc = 1;
                while (X % i == 0) {
                    X /= i;
                    loc *= i;
                }
                if(a <= b) {
                    a *= loc;
                } else {
                    b *= loc;
                }
            }
        }

        if(X > 1) {
            if(a <= b) {
                a *= X;
            } else {
                b *= X;
            }
        }

        System.out.println(a+" "+b);

    }



    //fast input reader
    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();
        }

        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;
        }
    }
}

