#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e12;
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
const long long MAXN = 1e6 + 10;
const long long N = 4000 + 10;
const long long MN = 200 + 10;
const long long mod = 1e9 + 7;
int main() {
  faster();
  long long r;
  cin >> r;
  for (int i = 1; i * i <= r; i++) {
    long long x = i;
    long long t = r;
    t -= x * x;
    t -= x;
    t--;
    if (t <= 0) break;
    if (t % (x * 2) == 0) {
      cout << x << " " << t / (x * 2) << endl;
      return 0;
    }
  }
  cout << "NO\n";
}
