#include <bits/stdc++.h>
int n, fac[105], m;
int main() {
  scanf("%d", &n);
  int n_ = n;
  for (int i = 2; i * i <= n; i++)
    if (n_ % i == 0) {
      fac[++m] = i;
      while (n_ % i == 0) n_ /= i;
    }
  if (n_ != 1) fac[++m] = n_;
  if (m <= 1) return puts("NO"), 0;
  puts("YES\n2");
  int a, b, x = fac[1], y = fac[2];
  for (a = 1; a <= y - 1; a++)
    if ((a * x + 1) % y == 0) {
      b = (n - 1 - a * x) / y;
      break;
    }
  printf("%d %d\n%d %d", a, n / x, b, n / y);
  return 0;
}
