#include <bits/stdc++.h>
using namespace std;
int a[111111], n;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  scanf("%d", &a[1]);
  int x = a[1];
  for (int i = 2; i <= n; i++) {
    scanf("%d", &a[i]);
    x = gcd(x, a[i]);
  }
  if (x > 1) {
    cout << "YES\n"
         << "0" << endl;
    return 0;
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] % 2 == 1 && a[i + 1] % 2 == 1) {
      int t1 = a[i] - a[i + 1];
      int t2 = a[i] + a[i + 1];
      a[i] = t1;
      a[i + 1] = t2;
      sum += 1;
    }
  }
  for (int i = 1; i <= n; i++)
    if (a[i] % 2 == 1) {
      if (i == 1) {
        int t1 = -2 * a[i + 1];
        int t2 = 2 * a[i];
        a[i] = t1;
        a[i + 1] = t2;
        sum += 2;
      } else {
        int t1 = -2 * a[i];
        int t2 = 2 * a[i - 1];
        a[i - 1] = t1;
        a[i] = t2;
        sum += 2;
      }
    }
  cout << "YES\n" << sum << endl;
  return 0;
}
