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