#include <bits/stdc++.h>
using namespace std;
int main() {
  int number;
  cin >> number;
  if (number % 2 == 0) {
    number /= 2;
    if (number % 2 != 0) {
      cout << number - 2 << "  " << number + 2 << endl;
    } else {
      cout << number - 1 << "  " << number + 1 << endl;
    }
  } else {
    number /= 2;
    cout << number << "  " << number + 1 << endl;
  }
  return 0;
}
