#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T& a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T& a, T b) {
  return a < b ? (a = b, true) : false;
}
int i, j;
int N;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (i = 2; i * i <= N; ++i) {
    if (N % i == 0 && gcd(i, N / i) == 1) {
      cout << "YES\n2\n";
      for (j = 1;; ++j) {
        int t = (N - 1 - j * (N / i));
        if (t % i == 0) {
          cout << j << ' ' << i << '\n';
          cout << t / i << ' ' << N / i << '\n';
          break;
        }
      }
      return 0;
    }
  }
  cout << "NO\n";
}
