#include <bits/stdc++.h>
using namespace std;
void vin(std::vector<int> &a) {
  for (int &x : a) cin >> x;
}
void vout(std::vector<int> &a) {
  for (int x : a) cout << x << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long r;
  cin >> r;
  long long mi = LLONG_MAX;
  for (long long x = 1; x * x < r; x++) {
    if ((r - 1) % x == 0) {
      if ((r - x * x - x - 1) % (2 * x) == 0) {
        long long y = (r - x * x - x - 1) / 2 / x;
        if (y > 0) {
          cout << x << " " << y << "\n";
          return 0;
        }
      }
      long long t = (r - 1) / x;
      if (((r - 1) / t - t - 1) % 2 == 0 && ((r - 1) / t - t - 1) / 2 > 0)
        mi = t;
    }
  }
  if (mi == LLONG_MAX)
    cout << "NO\n";
  else {
    long long y = ((r - 1) / mi - mi - 1) / 2;
    cout << mi << " " << y << "\n";
  }
}
