#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r;
  cin >> r;
  r--;
  for (long long x = 1; x * x <= r; x++) {
    if (r % x == 0) {
      long long y = r / x;
      y -= 1 + x;
      if (y & 1) continue;
      y /= 2;
      if ((x > 0) && (y > 0)) {
        cout << x << " " << y;
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
