#include <bits/stdc++.h>
using namespace std;
int main() {
  if (0) {
    freopen("PA.INP", "r", stdin);
    freopen("PA.OUT", "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long r;
  cin >> r;
  r--;
  pair<long long, long long> res;
  for (int x = (1); x <= int(sqrt(r)); x++)
    if (r % x == 0) {
      long long a = r / x;
      if ((a - x - 1) % 2 == 0 && (a - x - 1) / 2 > 0) {
        res = {x, (a - x - 1) / 2};
        break;
      }
    }
  if (!res.first)
    cout << "NO";
  else
    cout << res.first << " " << res.second;
  return 0;
}
