#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
long long n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 2; i < sqrt(n); i++) {
    if (n % i == 0) {
      int a = i;
      int b = n / a;
      if (a != b) {
        for (int k = 1; k < a; k++) {
          int aa = k * b;
          int bb = n - 1 - aa;
          if (bb % a == 0) {
            cout << "YES" << endl;
            cout << 2 << endl;
            cout << aa / b << " " << a << endl;
            cout << bb / a << " " << b << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
