#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const int inf = 0x3f3f3f3f;
int gcd(int a, int b) {
  int c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int a[maxn], n;
int main() {
  scanf("%d", &n);
  int g = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    g = gcd(a[i], g);
  }
  printf("YES\n");
  if (g > 1) {
    printf("0\n");
    return 0;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if ((a[i] & 1) == 0)
      continue;
    else {
      if (i + 1 < n) {
        if ((a[i + 1] & 1) == 1) {
          ans += 1;
          i++;
        } else {
          ans += 2;
          i++;
        }
      } else
        ans += 2;
    }
  }
  printf("%d\n", ans);
  return 0;
}
