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