#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
int n, a[N], stk[N], top, ans = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int d = a[1];
  for (int i = 2; i <= n; i++) d = gcd(d, a[i]);
  if (d > 1) {
    puts("YES");
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (a[i] & 1) stk[++top] = i;
  for (int i = 1; i <= top; i++) {
    if (stk[i + 1] == stk[i] + 1)
      ans++, i++;
    else
      ans += 2;
  }
  puts("YES");
  printf("%d\n", ans);
}
