#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r;
  cin >> r;
  int a = sqrt(r), check = 0;
  for (int i = 1; i < a; i++) {
    long long y = (r - 1 - i - i * i) / (2 * i);
    if (i * i + 2 * i * y + i + 1 == r) {
      cout << i << " " << y;
      check = 1;
      break;
    }
  }
  if (check == 0) {
    cout << "NO";
  }
  return 0;
}
