#include <bits/stdc++.h>
using namespace std;
int several[130000];
int n;
int gcd(int n, int m) {
  if (n < m) {
    n = m + n;
    m = n - m;
    n = n - m;
  }
  if (m == 0) return n;
  return gcd(m, n % m);
}
int main() {
  scanf("%d", &n);
  int cnt = 0;
  for (int i = 1; i <= n; i++) scanf("%d", &several[i]);
  int a = several[1];
  int b = several[2];
  int c = gcd(a, b);
  int i;
  for (i = 3; i <= n; i++) {
    if (c <= 1) break;
    c = gcd(c, several[i]);
  }
  if (c > 1) {
    printf("YES\n");
    printf("0");
  } else {
    for (int i = 1; i <= n - 1;) {
      if (several[i] % 2 != 0) {
        if (several[i + 1] % 2 != 0) {
          several[i]++;
          several[i + 1]++;
          cnt++;
        } else {
          several[i]++;
          cnt = cnt + 2;
        }
        i = i + 2;
      } else {
        i++;
      }
    }
    if (several[n] % 2 != 0) {
      cnt = cnt + 2;
    }
    printf("YES\n");
    printf("%d", cnt);
  }
}
