#include <bits/stdc++.h>
using namespace std;
int a[100005] = {0};
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  int ob = a[0];
  for (int i = 1; i < n; ++i) {
    int t1 = a[i];
    int t2 = ob;
    int c;
    if (t1 < t2) swap(t1, t2);
    while (t1 % t2 != 0) {
      c = t1 % t2;
      t1 = t2;
      t2 = c;
    }
    ob = t2;
    if (ob == 1) break;
  }
  if (ob != 1) {
    cout << "YES" << '\n' << 0;
    return 0;
  }
  cout << "YES" << '\n';
  int k = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2 == 1) {
      if (a[i + 1] % 2 == 1) {
        a[i + 1] = 0;
        ++k;
      } else
        k += 2;
    }
  }
  cout << k;
  return 0;
}
