#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, z, k, w, ans;
int A[100005];
int gcd(int x, int y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) scanf("%d", &A[i]);
  x = A[0];
  for (int i = (1); i < (n); i++) x = gcd(x, A[i]);
  if (x > 1) {
    printf("YES\n0\n");
    return 0;
  }
  for (int i = (0); i < (n); i++) A[i] = A[i] % 2;
  ans = 0;
  for (int i = (0); i < (n - 1); i++) {
    if (A[i] == 1 && A[i + 1] == 1) {
      ans++;
      A[i] = A[i + 1] = 0;
    }
  }
  for (int i = (0); i < (n); i++) {
    if (A[i] == 1) ans += 2;
  }
  printf("YES\n");
  printf("%d\n", ans);
  return 0;
}
