#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  double x = 1, flag = -1;
  double y;
  while (x) {
    y = (n - x * x - x - 1) / (2 * x);
    if (y <= 0) {
      flag = 1;
      break;
    }
    if (ceil(y) == y) break;
    x++;
  }
  cout << std::setprecision(12);
  if (flag == 1)
    cout << "NO";
  else
    cout << x << " " << y;
  cout << "\n";
}
