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