#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int e = 0;
  for (double i = 1; i < 300000000; i++) {
    double a = ((double)((double)(n - 1) / i) - i - 1) / (2.0);
    long long int x = (long long int)a;
    if (a > 0 and x == a) {
      cout << i << " " << (long long int)a << endl;
      e = 1;
      break;
    }
  }
  if (e == 0) {
    cout << "NO" << endl;
  }
}
