#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  register char c = getchar();
  x = 0;
  while (c < '0' || c > '9') c = getchar();
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c - '0');
}
inline int gcd(int x, int y) {
  while (x) x ^= y ^= x ^= y %= x;
  return y;
}
int main() {
  int n, a, g = 0, x = 0, z = 0;
  read(n);
  while (n--) {
    read(a);
    g = gcd(g, a);
    if (a % 2)
      ++x;
    else
      z += x / 2 + x % 2 * 2, x = 0;
  }
  if (g > 1)
    z = 0;
  else
    z += x / 2 + x % 2 * 2;
  cout << "YES\n" << z;
}
