#include <bits/stdc++.h>
int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
int main() {
  int n;
  scanf("%d", &n);
  for (int p = 2; p * p <= n; p++)
    if (n % p == 0 && gcd(p, n / p) == 1) {
      int q = n / p;
      for (int x = 1; x < p; x++)
        if ((n - 1 - x * q) % p == 0) {
          int y = (n - 1 - x * q) / p;
          if (0 < y && y < q) {
            puts("YES");
            printf("2\n%d %d\n%d %d\n", x, p, y, q);
            return 0;
          }
        }
    }
  puts("NO");
  return 0;
}
