#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, flag = 0, num;
  cin >> r;
  double x = 1.0, y;
  while ((flag != 1) && (x <= 1000000)) {
    num = (r - (x * x + x + 1)) / (2 * x);
    if ((ceil((r - (x * x + x + 1)) / (2 * x)) == num) && (num > 0)) {
      flag = 1;
    } else {
      x++;
    }
  }
  if (flag)
    cout << x << " " << num;
  else
    cout << "NO";
}
