#include <bits/stdc++.h>
using namespace std;
bool prime[100005];
void precompute() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  for (int i = 2; i < 100005; i++) {
    if (prime[i]) {
      for (int j = 2 * i; j < 100005; j += i) {
        if (prime[j]) {
          prime[j] = false;
        }
      }
    }
  }
}
map<int, int> pf;
int n;
void decompose() {
  int maxi = (1e5) + 5;
  int left = n;
  for (int i = 2; i < maxi; i++) {
    while (left % i == 0) {
      pf[i] = 1;
      left /= i;
    }
  }
  if (left != 1) pf[left] = 1;
}
long long int po(int a, int b, int mod) {
  if (b == 0) return 1LL;
  long long int x = po(a, b / 2, mod);
  x = (x * x) % mod;
  if (b % 2 == 1) {
    x = (x * a) % mod;
  }
  return x;
}
int main() {
  precompute();
  cin >> n;
  decompose();
  if (pf.size() < 2) {
    cout << "NO" << endl;
    exit(0);
  }
  cout << "YES" << endl;
  cout << 2 << endl;
  auto iter = pf.begin();
  long long int p = iter->first;
  iter++;
  long long int q = iter->first;
  long long int inv = po(p, q - 2, q);
  long long int a = ((q - 1) * inv) % q;
  long long int b = ((n - 1) - p * a) / q;
  cout << a << " " << n / p << endl;
  cout << b << " " << n / q << endl;
}
