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