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