#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7;
const long long xinc[] = {0, 0, 1, -1};
const long long yinc[] = {1, -1, 0, 0};
const long double PI = acos(-1.0);
long long r, x, y;
void solve() {
  cin >> r;
  for (long long x = 1; x * x <= r; x++) {
    long long num = r - (x * x + x + 1);
    if (num <= 0) break;
    long long den = 2 * x;
    if (num % den == 0) {
      cout << x << " " << num / den << '\n';
      return;
    }
  }
  cout << "NO" << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) solve();
  return 0;
}
