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