#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = 1e8;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long double r, y;
  cin >> r;
  for (ll x = 1; x <= 1000000; x++) {
    y = (r - x * x - x - 1) / (2 * x);
    if (ceil(y) == y && y > 0) return cout << x << ' ' << (ll)y << '\n', 0;
  }
  cout << "NO";
  return 0;
}
