#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a && b) {
    if (a > b) {
      a %= b;
    } else {
      b %= a;
    }
  }
  return a + b;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int(i) = 0; (i) < (n); (i)++) cin >> a[i];
  int odd = 0;
  bool lastOdd = false;
  bool canWe = true;
  int moves = 0;
  int curComm = a[0];
  for (int(i) = 0; (i) < (n); (i)++) {
    if (curComm > 1) {
      curComm = gcd(curComm, a[i]);
    }
    if (a[i] % 2) {
      odd++;
      if (lastOdd) {
        lastOdd = false;
        moves++;
      } else {
        lastOdd = true;
      }
    } else {
      if (lastOdd) {
        moves += 2;
      }
      lastOdd = false;
    }
  }
  if (lastOdd) moves += 2;
  if (curComm > 1) {
    cout << "YES" << endl << 0 << endl;
    return 0;
  }
  if (!canWe) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    cout << moves << endl;
  }
  return 0;
}
