#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t, x, y, z, q, k, f, s;
  long long cur1 = 0, cur2 = 0, cur3 = 0, ans = 0, ans1 = 0;
  long long cur = 0;
  cin >> n;
  for (long long i = 1; i < pow(10, 7); ++i) {
    if ((n - 1 - i - i * i) % (2 * i) == 0 && (n - 1 - i - i * i > 0)) {
      cout << i << " " << (n - 1 - i - i * i) / 2 / i;
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
