#include <bits/stdc++.h>
using namespace std;
long long mx = -1e9, mn = 1e9;
long long T, n, m, k, a[200005], b[200005], d, ans, l, r, sum, mid, check, coin,
    z, x2, y2, x, y;
vector<long long> v, v1;
map<long long, long long> mp, mm;
pair<long long, long long> p[200005];
queue<pair<long long, long long> > q;
int main() {
  scanf("%lld", &n);
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i != 0) continue;
    for (int j = 1; j < i; j++) {
      long long uld = (n - 1) - (n / i) * j;
      if (uld > x && uld % i == 0) {
        cout << "YES" << endl;
        cout << 2 << endl;
        cout << j << " " << i << endl;
        cout << uld / i << " " << n / i;
        return 0;
      }
    }
  }
  cout << "NO";
}
