#include <bits/stdc++.h>
int N, a[100000], G, O;
int gcd(int x, int y) {
  int r;
  while (y) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
inline int F(int x) { return (x >> 1) + ((x & 1) << 1); }
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%d", a + i);
  G = a[0];
  for (int i = 1; i < N; i++) G = gcd(G, a[i]);
  if (G > 1) {
    puts("YES\n0");
    return 0;
  }
  for (int i = 0; i < N; i++)
    if (a[i] & 1) {
      int j = i;
      while (j < N - 1 && (a[j + 1] & 1)) j++;
      O += F(j - i + 1);
      i = j;
    }
  printf("YES\n%d\n", O);
  return 0;
}
