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