import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;

public class FadiLCM {

  public static class Factor {
    public long base;
    public int exponent;

    public Factor(long b, int e) {
      this.base = b;
      this.exponent = e;
    }

    public void incrementExponent() {
      this.exponent++;
    }
  }

  public static List<Factor> pf;

  public static double root;

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long X = in.nextLong();
    root = Math.sqrt(X);
    computePrimeFactorization(X);

    // for (int i = 0; i < pf.size(); i++) {
    //   System.out.print(pf.get(i).base + "^" + pf.get(i).exponent + "\t");
    // }

    if (pf.isEmpty()) System.out.println("1 1");
    else if (pf.size() == 1) System.out.println("1 " + (long) Math.pow(pf.get(0).base, pf.get(0).exponent));
    else {
      long[] answer = findOptimalPair(X);
      System.out.println(answer[0] + " " + answer[1]);
    }
  }

  public static void computePrimeFactorization(long X) {
    pf = new ArrayList<Factor>();
    if (X % 2 == 0) {
      pf.add(new Factor(2, 0));
      while (X % 2 == 0) {
        pf.get(pf.size() - 1).incrementExponent();
        X = X / 2;
      }
    }
    for (int i = 3; i <= Math.sqrt(X); i = i + 2) {
      if (X == 1) break;

      if (X % i == 0) {
        pf.add(new Factor(i, 0));
        while (X % i == 0) {
          pf.get(pf.size() - 1).incrementExponent();
          X = X / i;
        }
      }
    }
    if (X != 1) {
      pf.add(new Factor(X, 1));
    }
  }

  /**
   * Doesn't work since factors might not be in consecutive order
   * @param X
   * @return
   */
  public static long[] slidingWindow(long X) {
    long[] output = new long[2];

    long current = (long) Math.pow(pf.get(0).base, pf.get(0).exponent);
    long best = current;
    double smallestDifference = Math.abs(best - root);
    int left = 0;
    int right = 0;

    while (right < pf.size() && left <= right) {
      if (current < root) {
        if (right == pf.size() - 1) break;
        right++;
        current *= (long) Math.pow(pf.get(right).base, pf.get(right).exponent);
      }
      else if (current > root) {
        current /= (long) Math.pow(pf.get(left).base, pf.get(left).exponent);
        left++;
      }
      else break;

      if (Math.abs(current - root) < smallestDifference) {
        best = current;
        smallestDifference = Math.abs(current - root);
      }
    }

    output[0] = best;
    output[1] = X/ best;

    return output;
  }

  public static long[] findOptimalPair(long X) {
    long[] output = new long[2];

    double smallestDifference = Integer.MAX_VALUE;
    long best = 1;
    for (int i = 0; i < Math.pow(2, pf.size()); i++) {
      long current = 1;
      for (int j = 0; j < pf.size(); j++) {
        if ((i >> j) % 2 == 1) current *= (long) Math.pow(pf.get(j).base, pf.get(j).exponent);
      }

      if (Math.abs(current - root) < smallestDifference) {
        best = current;
        smallestDifference = Math.abs(current - root);
      }
    }

    output[0] = best;
    output[1] = X/ best;
    return output;
  }

}
