#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); }
int num[100005];
int main() {
  int n;
  while (cin >> n) {
    for (int j = 0; j < n; j++) cin >> num[j];
    int gcd = GCD(num[0], num[1]);
    for (int j = 2; j < n; j++) gcd = GCD(gcd, num[j]);
    if (gcd != 1) {
      cout << "YES" << endl;
      cout << "0" << endl;
      continue;
    }
    int ans = 0;
    bool odd_ok;
    if ((num[0] & 1) == 0)
      odd_ok = false;
    else
      odd_ok = true;
    for (int j = 1; j < n; j++) {
      if ((num[j] & 1) == 1) {
        if (odd_ok)
          ans++, odd_ok = false;
        else
          odd_ok = true;
      } else {
        if (odd_ok)
          ans += 2, odd_ok = false;
        else
          odd_ok = false;
      }
    }
    if (odd_ok) ans += 2;
    cout << "YES" << endl;
    cout << ans << endl;
  }
}
