#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r;
  cin >> r;
  long int x = 1;
  long long int k, l;
  k = x + 1;
  long long int p = (long long int)powl(k, 2);
  p = p + x;
  while (r >= p) {
    l = (long long int)powl(x, 2);
    l = r - l - x - 1;
    if (l % (2 * x) == 0) {
      cout << x << " " << (l / (2 * x));
      return 0;
    } else {
      x = x + 1;
      k = x + 1;
      p = (long long int)powl(k, 2);
      p = p + x;
    }
  }
  cout << "NO" << endl;
}
