#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r;
  cin >> r;
  vector<long long> ans;
  for (int i = 1; i < sqrt(r); i++) {
    long long rem = r - ((i * i) + i + 1);
    if (rem % 2 == 0 && rem > 0) {
      ans.push_back(i);
      ans.push_back(rem / 2);
      break;
    }
  }
  if (ans.empty())
    cout << "NO";
  else
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
