#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T sqr(const T &a) {
  return a * a;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <typename T>
inline int nread(vector<T> &a) {
  int n;
  cin >> n;
  a.clear();
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  return n;
}
int main() {
  ios_base::sync_with_stdio(0);
  vector<int> a;
  int n = nread(a);
  int g = a[0];
  cout << "YES\n";
  for (int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g > 1) {
    cout << 0;
    return 0;
  }
  int ans = 0;
  int cur = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2 == 1)
      ++cur;
    else {
      ans += cur / 2 + cur % 2 * 2;
      cur = 0;
    }
  }
  ans += cur / 2 + cur % 2 * 2;
  cout << ans;
  return 0;
}
