#include <bits/stdc++.h>
int LCM(int a, int b, int x) {
  int max = (a > b) ? a : b;
  while (1) {
    if (max % a == 0 && max % b == 0) {
      if (max == x) {
        return 1;
      } else {
        return 0;
      }
    }
    max++;
  }
}
int main() {
  int j = 0, sum = 0, value = 0;
  int arr[9999];
  int arr2[9999];
  int selectedArr[9999];
  int selectedArr2[9999];
  int x;
  scanf("%d", &x);
  for (int i = 1; i <= x; i++) {
    if (x % i == 0) {
      arr[i] = x / i;
      arr2[i] = i;
      if (LCM(arr[i], arr2[i], x) == 1) {
        selectedArr[j] = arr[i];
        selectedArr2[j] = arr2[i];
        j++;
      } else {
        continue;
      }
    } else {
      continue;
    }
  }
  int index = 0;
  for (int k = 0; k < j; k++) {
    sum = selectedArr[k] + selectedArr2[k];
    if (k == 0) {
      value = sum;
      index = k;
      continue;
    } else if (sum <= value) {
      value = sum;
      index = k;
    }
  }
  printf("%d %d", selectedArr[index], selectedArr2[index]);
  return 0;
}
