#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long r;
  cin >> r;
  long long rhs = r - 1;
  long long nxt;
  for (long long x = 1; x * x <= rhs; x++) {
    if (rhs % x == 0) {
      nxt = rhs / x;
      nxt = nxt - x - 1;
      if (nxt > 0 && nxt % 2 == 0) {
        cout << x << " " << (nxt / 2) << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
}
