#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  int arr[n];
  int g = 0, ans = 0, cnt = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    g = gcd(arr[i], g);
    if (arr[i] % 2 == 1) {
      cnt++;
    } else {
      ans += (cnt / 2) + 2 * (cnt % 2);
      cnt = 0;
    }
  }
  ans += (cnt / 2) + 2 * (cnt % 2);
  cout << "YES\n";
  if (g != 1) {
    cout << 0 << '\n';
  } else {
    cout << ans << '\n';
  }
  return 0;
}
