#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b;
  cin >> a;
  long long p = pow(a, 0.5);
  long long ans1 = 0;
  long long ans2 = 0;
  for (long long i = 1; i < p; i++) {
    long double f = (a - i * i - i - 1) / ((2.0) * i);
    if ((long long)f == f) {
      ans1 = i;
      ans2 = (long long)f;
      break;
    } else
      continue;
  }
  if (ans1 == 0)
    cout << "NO";
  else if (ans1 != 0) {
    cout << ans1 << " " << ans2;
  }
}
