#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int n, a[N], d;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  n = read();
  d = a[1] = read();
  for (int i = 2; i <= n; i++) a[i] = read(), d = gcd(d, a[i]);
  if (d > 1) {
    puts("YES\n0");
    return 0;
  }
  for (int i = 1; i <= n; i++) a[i] = a[i] & 1;
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (a[i]) {
      if (a[i + 1])
        ans++, a[i] = a[i + 1] = 0;
      else
        ans += 2, a[i] = 0;
    }
  printf("YES\n%d", ans);
}
