#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10240000000,10240000000")
using namespace std;
int a[100005];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  while (cin >> n) {
    int gc = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      gc = gcd(max(gc, a[i]), min(gc, a[i]));
      if (a[i] & 1)
        a[i] = 1;
      else
        a[i] = 0;
    }
    puts("YES");
    if (gc > 1)
      puts("0");
    else {
      int res = 0;
      int cnt = 0;
      for (int i = 0; i < n; i++) {
        if (a[i] == 1)
          cnt++;
        else {
          res += (cnt) / 2 + 2 * (cnt & 1);
          cnt = 0;
        }
      }
      if (cnt != 0) res += (cnt) / 2 + 2 * (cnt & 1);
      cout << res << endl;
    }
  }
  return 0;
}
