#include <bits/stdc++.h>
using namespace std;
long long a[100010];
long long gcd(long long a, long long b) { return a % b ? gcd(b, a % b) : b; }
int main() {
  long long n, t;
  scanf("%lld", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  long long ans = gcd(abs(a[1]), abs(a[2]));
  for (int i = 3; i <= n; i++) ans = gcd(ans, abs(a[i]));
  if (ans > 1)
    printf("YES\n0\n");
  else {
    int num = 0;
    for (int i = 1; i < n; i++)
      while (a[i] & 1) t = a[i], a[i] -= a[i + 1], a[i + 1] += t, ++num;
    while (a[n] & 1) t = a[n - 1], a[n - 1] -= a[n], a[n] += t, ++num;
    printf("YES\n%d\n", num);
  }
  return 0;
}
