Mike has a sequence A = [a1, a2, ..., an] of length n. He considers the sequence B = [b1, b2, ..., bn] beautiful if the gcd of all its elements is bigger than 1, i.e. <image>. 

Mike wants to change his sequence in order to make it beautiful. In one move he can choose an index i (1 ≤ i < n), delete numbers ai, ai + 1 and put numbers ai - ai + 1, ai + ai + 1 in their place instead, in this order. He wants perform as few operations as possible. Find the minimal number of operations to make sequence A beautiful if it's possible, or tell him that it is impossible to do so.

<image> is the biggest non-negative number d such that d divides bi for every i (1 ≤ i ≤ n).

Input

The first line contains a single integer n (2 ≤ n ≤ 100 000) — length of sequence A.

The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109) — elements of sequence A.

Output

Output on the first line "YES" (without quotes) if it is possible to make sequence A beautiful by performing operations described above, and "NO" (without quotes) otherwise.

If the answer was "YES", output the minimal number of moves needed to make sequence A beautiful.

Examples

Input

2
1 1


Output

YES
1


Input

3
6 2 4


Output

YES
0


Input

2
1 3


Output

YES
1

Note

In the first example you can simply make one move to obtain sequence [0, 2] with <image>.

In the second example the gcd of the sequence is already greater than 1. 
def gcd(a,b):
    while b: a,b = b,a%b;
    return a;

def solve(A,n):
    if reduce(lambda x,y:gcd(x,y),A) != 1: return 0;

    ans = 0;
    for i in xrange(n - 1):
        if A[i]%2 == 1 and A[i + 1]%2 == 1:
            a,b = A[i],A[i + 1];
            A[i] = abs(a - b);
            A[i + 1] = a + b;
            ans += 1;

    for i in xrange(n ):
        if A[i]%2 == 1:
            ans += 2;
    return ans;

""""""
def bf(A,n):
    q = [tuple(A)];
    d = 0;
    vis = set(); vis.add(tuple(A));
    while len(q):
        L = len(q);
        for jj in xrange(L):
            u = list(q.pop(0));
            g = reduce(lambda x,y:gcd(x,y),u);
            if g != 1:
                return u,d;
            for i in xrange(n - 1):
                a,b = u[i],u[i + 1];
                u[i] = abs(a - b);
                u[i + 1] = a + b;
                t = tuple(u);
                if t not in vis:
                    vis.add(t);
                    q.append(t);
                u[i],u[i + 1] = a,b;
        d += 1;
    return "can't";

n = int(raw_input());
A = map(int,raw_input().split());
print "YES";
print solve(A,n);


"""from  random import randint
def gen():
    return [randint(1,100) for i in xrange(randint(1,5))];

for i in xrange(10):
    A = gen();
    n = len(A)
    d = solve([x for x in A],n);
    B,d2 = bf([x for x in A],n);
    if d != d2:
        print A,d,d2,B
A = [14, 41, 86, 18, 36];
n = len(A);
print solve(A,n);
A = [14, 41, 86, 18, 36];
n = len(A);
print bf(A,n);
"""
