#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int sq = sqrt(n);
  for (long long int i = 1; i <= sq; i++) {
    long long int chk = n - (i * i) - 1 - i;
    long long int j = 2 * i;
    if (j > chk) {
      cout << "NO" << endl;
      break;
    } else if (chk % j == 0) {
      cout << i << " " << chk / j << endl;
      break;
    }
  }
}
