#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r;
  cin >> r;
  long long int a = -1, b = -1;
  if (r % 2 == 0)
    cout << "NO";
  else {
    r--;
    long long int x;
    for (x = 1; x <= sqrt(r); x++) {
      long long int temp = x * x + x;
      long long int rem = r - temp;
      if (rem > 1) {
        if (rem % (2 * x) == 0) {
          a = x;
          b = rem / (2 * x);
          break;
        }
      } else
        break;
    }
    if (a >= 0 && b >= 0)
      cout << a << " " << b;
    else
      cout << "NO";
  }
}
