import java.util.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Que {

    void solve() throws IOException {

        FastReader sc = new FastReader();
        long n = sc.nextLong();
        long ans1 = 1 ,ans2 = 1;

        for(long i=1;i*i <= n;i++)
        {
            if(n%i==0 && n/i != i)
            {
                ans1 = i;
                ans2 = n/i;
            }
        }
        System.out.println(ans1+" "+ans2);
    }

    public static void main(String[] args) throws IOException {
        // TODO Auto-generated method stub
        new Que().solve();
    }

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