#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  cin >> n;
  long long a[n], g;
  for (int i = 0; i < n; i++) cin >> a[i];
  g = a[0];
  for (int i = 1; i < n; i++) g = gcd(g, a[i]);
  if (g > 1) {
    cout << "YES\n";
    cout << "0\n";
    return 0;
  }
  int step = 0;
  for (int i = 0; i < n; i++) {
    if (i == n - 1 && a[i] % 2) {
      step += 2;
      break;
    } else {
      if (a[i] % 2) {
        if (a[i + 1] % 2)
          step++;
        else
          step += 2;
        a[i] = 0;
        a[i + 1] = 0;
      }
    }
  }
  cout << "YES\n";
  cout << step << endl;
  return 0;
}
