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