#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  long long int x = 1, y = INT_MAX, k = 0;
  while (y > 0) {
    long long int d = x * x + x + 1;
    y = (t - d) / (2 * x);
    if ((t - d) % (2 * x) == 0 && y > 0) {
      k = 1;
      break;
    }
    x++;
  }
  if (k == 1)
    cout << x << " " << y;
  else
    cout << "NO";
}
