#include <bits/stdc++.h>
using namespace std;
long long int INF = 1e12;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  long long int r, x, y;
  cin >> r;
  for (long long int i = 1; i < sqrt(r) + 1; i++) {
    x = i;
    y = (r - 1 - x * x) / (2 * x);
    if ((x * x + 2 * x * y + x) == r - 1 and y != 0) {
      cout << x << " " << y << "\n";
      return 0;
    }
  }
  cout << "NO\n";
}
