#include <bits/stdc++.h>
using namespace std;
vector<pair<long long int, long long int>> sqr;
inline void init() {
  long long int start = 1;
  while ((start * start) <= 10000000000000) {
    sqr.push_back({start, start * start});
    start++;
  }
}
int main() {
  init();
  long long int r;
  cin >> r;
  for (long long int i = 0; i < (long long int)sqr.size(); i++) {
    long long int x = sqr[i].first;
    long long int x2 = sqr[i].second;
    long long int num = r - x2 - x - 1;
    long long int den = 2 * x;
    if (num % den == 0) {
      long long int y = num / den;
      if (y > 0) {
        cout << x << " " << y << endl;
        exit(0);
      }
    }
  }
  puts("NO");
  return 0;
}
