#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
const long long mod = 1e9 + 7;
const long long inf = 1e18;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long powm(long long base, long long exp) {
  long long ans = 1;
  while (exp) {
    if (exp & 1) ans = (ans * base) % mod;
    exp >>= 1, base = (base * base) % mod;
  }
  return ans;
}
long long inv(long long n) {
  long long ans = powm(n, mod - 2);
  return ans;
}
long long add(long long a, long long b) { return (a % mod + b % mod) % mod; }
long long sub(long long a, long long b) {
  return (a % mod + mod - b % mod) % mod;
}
long long mult(long long a, long long b) {
  return ((a % mod) * (b % mod)) % mod;
}
long long choose2(long long n) {
  long long ans = (n * (n - 1)) / 2;
  return ans;
}
long long dist2(long long x1, long long y1, long long x2, long long y2) {
  long long ans = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long r;
  cin >> r;
  long long maxi = 1e7;
  long long ans;
  for (long long x = 1; x < maxi + 1; x++) {
    long long sub = (x * x + x + 1);
    long long t = r;
    t -= sub;
    if (t % (2 * x) == 0 && (t > 0)) {
      ans = (t / (2 * x));
      cout << x << " " << ans;
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
