#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2")
using namespace std;
const int mod = 1e9 + 7, q = 1e5 + 7;
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
bool ok(vector<long long>& a) {
  long long g = 0;
  for (auto x : a) {
    g = gcd(g, abs(x));
  }
  return g > 1;
}
void print(vector<long long>& a) {
  for (long long x : a) cout << x << " ";
  cout << "\n";
}
void p1(vector<long long>& a, long long& cnt) {
  for (int i = 0; i < (int)(a.size()) - 1; ++i) {
    if (abs(a[i] % 2) == 1 && abs(a[i + 1] % 2) == 1) {
      long long b = a[i];
      a[i] = a[i] - a[i + 1];
      a[i + 1] += b;
      ++cnt, ++i;
      continue;
    }
  }
}
void p2(vector<long long>& a, long long& cnt) {
  for (int i = 0; i < (int)(a.size()) - 1; ++i) {
    if (abs(a[i] % 2) != abs(a[i + 1] % 2)) {
      long long b = a[i];
      a[i] = a[i] - a[i + 1];
      a[i + 1] += b;
      ++cnt, ++i;
      continue;
    }
  }
}
int main() {
  cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<long long> a(n);
  long long g = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    g = gcd(a[i], g);
  }
  if (g > 1) {
    cout << "Yes\n0";
    exit(0);
  }
  long long cnt = 0, bad = 0;
  for (int i = 0; i < 10; ++i) {
    p1(a, cnt);
    p2(a, cnt);
  }
  if (ok(a)) {
    cout << "YES\n" << cnt;
  } else
    cout << "NO";
  return 0;
}
