#include <bits/stdc++.h>
long long r;
bool check(long long x) {
  long long a = (r / x) - x - 1;
  if (a <= 1 || a % 2 != 0) return false;
  long long y = a / 2;
  std::cout << x << ' ' << y;
  return true;
}
int main() {
  std::cin >> r;
  r = r - 1;
  std::set<long long> div;
  for (long long i = 1, e = sqrt(r); i <= e; ++i)
    if (r % i == 0) {
      div.insert(i);
      div.insert(r / i);
    }
  for (auto& d : div)
    if (check(d)) return 0;
  std::cout << "NO";
  return 0;
}
