#include <bits/stdc++.h>
using namespace std;
int n, i, a, b, fa, fb, aux;
int main() {
  cin >> n;
  for (i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      fa = a = i;
      fb = b = n / i;
      break;
    }
  }
  if (fa == 0) {
    cout << "NO";
    return 0;
  }
  while (b % fa == 0) {
    a *= fa;
    b /= fa;
  }
  if (a > b) {
    aux = a;
    a = b;
    b = aux;
  }
  if (a == 1) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n2\n";
  for (i = 1; i < a; ++i) {
    if ((n - 1 - b * i) % a == 0) {
      cout << i << ' ' << a << "\n";
      cout << (n - 1 - b * i) / a << ' ' << b << "\n";
      return 0;
    }
  }
  return 0;
}
