#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n, a[MAXN], b[MAXN];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    b[i] = a[i] & 1;
  }
  int g = a[0];
  for (int i = 1; i < n; ++i) g = gcd(g, a[i]);
  puts("YES");
  if (g > 1) {
    puts("0");
    return 0;
  }
  int ans = 0;
  b[n] = 0;
  for (int i = 0; i < n; ++i) {
    if (b[i]) {
      if (b[i + 1])
        b[i] = b[i + 1] = 0, ++ans;
      else
        b[i] = 0, ans += 2;
    }
  }
  printf("%d\n", ans);
}
