#include <bits/stdc++.h>
using namespace std;
long long r;
int main() {
  cin >> r;
  r--;
  for (long long x = 1; x * (x + 3) <= r; x++)
    if (r % x == 0LL) {
      long long y2 = r / x - x - 1;
      if (y2 % 2 == 0LL) {
        cout << x << " " << y2 / 2 << endl;
        return 0;
      }
    }
  cout << "NO" << endl;
  return 0;
}
