#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, i, j;
  cin >> n;
  if (n % 2 == 0) {
    i = j = n / 2;
    i--;
    j++;
    if (n % 4 != 0) {
      i--;
      j++;
    }
  } else {
    i = n / 2;
    j = n / 2 + 1;
  }
  cout << i << " " << j;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
