import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        inputClass in = new inputClass(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CFadiAndLCM solver = new CFadiAndLCM();
        solver.solve(1, in, out);
        out.close();
    }

    static class CFadiAndLCM {
        public void solve(int testNumber, inputClass sc, PrintWriter out) {
            long x = sc.nextLong();
            long u = x;
            if (x == 1) {
                out.println(1 + " " + 1);
                return;
            }
            ArrayList<Long> divs = new ArrayList<>();
            for (long i = 2; i * i <= x; i++) {
                if (x % i == 0) {
                    divs.add(i);
                    while (x % i == 0) {
                        x /= i;
                    }
                }
            }
            if (x > 1) {
                divs.add(x);
            }
            if (divs.size() == 1) {
                out.println(1 + " " + u);
            } else {
                out.println(u / divs.get(divs.size() - 1) + " " + u / divs.get(divs.size() - 2));
            }

        }

    }

    static class inputClass {
        BufferedReader br;
        StringTokenizer st;

        public inputClass(InputStream in) {

            br = new BufferedReader(new InputStreamReader(in));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

