#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r;
  cin >> r;
  long long sqr = sqrt(r);
  for (long long x = 1; x <= sqr; ++x) {
    long long first = (r - x * x - x - 1);
    if (first <= 0) continue;
    long long second = 2ll * x;
    if ((first % second) == 0) {
      cout << x << " " << (first / second) << "\n";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
