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