#include <bits/stdc++.h>
const int INF = 2000000000;
const double EPS = 1e-6;
using namespace std;
int v[100010], n, cnt;
bool isEven[100010];
int gcd(int a, int b) {
  a %= b;
  if (a == 0) return b;
  return gcd(b, a);
}
int allGcd() {
  int base = gcd(v[0], v[1]);
  for (int i = (int)(2); i < (int)(n); ++i) base = gcd(base, v[i]);
  return base;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)(0); i < (int)(n); ++i)
    scanf("%d", &v[i]), isEven[i] = (v[i] & 1 ? false : true);
  if (allGcd() == 1) {
    for (int i = (int)(0); i < (int)(n - 1); ++i) {
      if (!isEven[i] && !isEven[i + 1]) {
        isEven[i] = isEven[i + 1] = true;
        cnt++;
      }
    }
    for (int i = (int)(0); i < (int)(n - 1); ++i) {
      if (isEven[i] ^ isEven[i + 1]) {
        isEven[i] = isEven[i + 1] = true;
        cnt += 2;
      }
    }
  }
  puts("YES");
  cout << cnt << endl;
  return 0;
}
