#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r;
  cin >> r;
  if (r % 2 == 0 || r == 1 || r == 3)
    cout << "NO";
  else {
    long long x, y;
    long long up = (r - 1);
    for (int i = 1; i < 100000; i++) {
      if ((up / i - i - 1) % 2 == 0) {
        x = i;
        y = (up / i - i - 1) / 2;
        break;
      }
    }
    cout << x << " " << y;
  }
  return 0;
}
