#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (!min(a, b)) return max(a, b);
  return gcd(min(a, b), max(a, b) % min(a, b));
}
int v[200005];
int main() {
  int n;
  cin >> n;
  int seq1 = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int d = 0;
  int ok = 1;
  for (int i = 0; i < n; i++) {
    if (gcd(v[i], d) == 1) ok = 0;
    d = gcd(v[i], d);
  }
  if (ok) {
    cout << "YES\n0\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (v[i] & 1) {
      seq1++;
    } else {
      ans += seq1 / 2;
      if (seq1 & 1) ans += 2;
      seq1 = 0;
    }
  }
  if (seq1) {
    ans += seq1 / 2;
    if (seq1 & 1) ans += 2;
  }
  cout << "YES\n" << ans << endl;
  return 0;
}
