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