#include <bits/stdc++.h>
using namespace std;
int a[100002];
int gcd(int a, int b) {
  int c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int main() {
  int n;
  int mina = 2000000009;
  cin >> n;
  cin >> a[1];
  int ucln;
  ucln = a[1];
  for (long long int i = 2; i <= n; i++) {
    scanf("%d", a + i);
    ucln = gcd(ucln, a[i]);
  }
  int res0 = 1;
  for (long long int i = 1; i <= n; i++) {
    if (a[i] % ucln != 0) {
      res0 = 0;
    }
  }
  if (ucln == 1) {
    res0 = 0;
  }
  if (res0 == 1) {
    cout << "YES\n";
    cout << 0;
  } else {
    a[n + 1] = 2;
    int res = 0;
    for (int i = 1; i <= n;) {
      if (a[i] % 2 == 0) {
        i++;
      } else {
        if (a[i + 1] % 2 == 1) {
          res += 1;
          i += 2;
        } else {
          res += 2;
          i += 2;
        }
      }
    }
    cout << "YES\n";
    cout << res;
  }
}
