import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.split.map!(to!int).array;
    writeln("YES");

    if (A.reduce!gcd > 1) {
        writeln(0);
        return;
    }

    int ans = 0;
    foreach (i; 0..N) {
        if (A[i] % 2 == 0) continue;
        else if (i == N-1) ans += 2;
        else if (A[i+1] % 2 == 0) ans += 2;
        else {
            ans += 1;
            A[i+1] = 2;
        }
    }

    ans.writeln;
}
