#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5 + 5;
int a[MaxN];
int gcd(int x, int y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int main() {
  int n;
  scanf("%d", &n);
  int f = 0;
  int GCD = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    GCD = gcd(GCD, a[i]);
  }
  if (GCD > 1)
    printf("YES\n0\n");
  else {
    int sum = 0;
    for (int i = 1; i <= n - 1; i++) {
      if (a[i] % 2 == 1 && a[i + 1] % 2 == 1) {
        a[i] = 2;
        a[i + 1] = 2;
        sum++;
      }
    }
    for (int i = 1; i <= n - 1; i++) {
      if ((a[i] % 2 != 1 && a[i + 1] % 2 == 1) ||
          (a[i] % 2 == 1 && a[i + 1] % 2 != 1)) {
        a[i] = 2;
        a[i + 1] = 2;
        sum += 2;
      }
    }
    printf("YES\n%d\n", sum);
  }
  return 0;
}
