#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int gcd(int x, int y) {
  if (x % y) return gcd(y, x % y);
  return y;
}
int main() {
  int i, n, x, g, sum, ans = 0;
  cin >> n >> x;
  g = x;
  sum = x & 1;
  for (i = 1; i < n; i++) {
    scanf("%d", &x);
    g = gcd(g, x);
    if (x & 1)
      sum++;
    else {
      ans += sum / 2 + (sum & 1) * 2;
      sum = 0;
    }
  }
  ans += sum / 2 + (sum & 1) * 2;
  cout << "YES" << endl;
  if (g > 1)
    cout << 0;
  else
    cout << ans;
  return 0;
}
