#include <bits/stdc++.h>
using namespace std;
const long double pie = 3.14159265358979;
const long long mod = 1e9 + 7;
string vow = "aeiou";
void solve(int test_case) {
  long long r;
  cin >> r;
  for (long long x = 1;; x++) {
    long long num = r - (x * x + x + 1);
    if (num <= 0) {
      cout << "NO";
      cout << "\n";
      ;
      return;
    }
    if (num % (2 * x)) continue;
    ;
    long long y = num / x;
    y >>= 1;
    cout << x << " " << y;
    cout << "\n";
    return;
  }
}
int main() {
  int t = 1;
  for (int i = 0; i < t; i++) solve(i);
  return 0;
}
