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