#include <bits/stdc++.h>
using namespace std;
int nod(int a, int b) {
  if (b == 0)
    return a;
  else
    nod(b, a % b);
}
int n, m, M;
int main() {
  cin >> n;
  int c = 0;
  for (int i = 2; i * i <= n; i++) {
    m = i;
    M = n / i;
    if (n % i == 0 && nod(m, M) == 1 && m * M == n) {
      c++;
      break;
    }
  }
  if (c == 0) {
    cout << "NO";
    return 0;
  }
  for (int a = 1; a <= (n - 1) / M; a++) {
    int b = (n - 1 - M * a) / m;
    if (M * a + m * b == n - 1) {
      cout << "YES" << endl << 2 << endl;
      cout << a << " " << m << endl;
      cout << b << " " << M;
      break;
    }
  }
  return 0;
}
