#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
int a[N];
int GCD(int u, int v) {
  while (v != 0) {
    int r = u % v;
    u = v;
    v = r;
  }
  return u;
}
int gg;
long long ans;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (i != 0)
      gg = GCD(gg, a[i]);
    else
      gg = a[i];
  }
  if (gg != 1) {
    printf("YES\n0");
    return 0;
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] % 2 != 0) {
      if (a[i + 1] % 2 == 0)
        ans += 2;
      else
        ans += 1;
      a[i + 1] = 2;
    }
  }
  if (a[n - 1] % 2 != 0) {
    if (a[n - 2] % 2 == 0) {
      cout << "YES" << endl;
      cout << ans + 2 << endl;
    } else
      cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    cout << ans << endl;
  }
  return 0;
}
