#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int main() {
  long long r;
  cin >> r;
  r--;
  if (r == 0) {
    cout << "NO";
    return 0;
  }
  for (long long i = 1; i * i <= r; i++) {
    if (r % i == 0) {
      long long x = i;
      r /= x;
      r -= x;
      r--;
      if (r) {
        if ((r & 1) == 0) {
          cout << x << " " << r / 2;
          return 0;
        }
      }
    }
  }
  cout << "NO";
  return 0;
  return 0;
}
