#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (int i = 2; i * i < n; i++) {
    if (n % i == 0) {
      if (gcd(i, n / i) != 1) continue;
      cout << "YES" << endl;
      cout << 2 << endl;
      long long j = n / i;
      for (long long a = 1; a < j; a++) {
        if ((n - 1 - a * i) % j == 0) {
          cout << (n - 1 - i * a) / j << " " << i << endl;
          cout << a << " " << j << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
