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. 
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        void bd(int i, int[] a) {
            int x = a[i] - a[i + 1];
            int y = a[i] + a[i + 1];
            a[i] = x;
            a[i + 1] = y;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] a = new int[n];
            int gcd = 0;
            for (int i = 0; i < n; ++i) {
                a[i] = in.nextInt();
                gcd = IntMath.gcd(a[i], gcd);
            }

            if (gcd > 1) {
                out.println("YES\n0");
                return;
            }

            int re = 0;
            for (int i = 0; i < n - 1; ++i)
                if (Math.abs(a[i]) % 2 == 1 && Math.abs(a[i + 1]) % 2 == 1) {
                    re++;
                    bd(i, a);
                }
            for (int i = 0; i < n - 1; ++i)
                if (Math.abs(a[i]) % 2 == 1 || Math.abs(a[i + 1]) % 2 == 1) {
                    re += 2;
                    bd(i, a);
                    bd(i, a);
                }
            out.println("YES");
            out.println(re);
        }

    }

    static final class MathPreconditions {
        static int checkNonNegative(String role, int x) {
            if (x < 0) {
                throw new IllegalArgumentException(role + " (" + x + ") must be >= 0");
            }
            return x;
        }

        private MathPreconditions() {
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public static boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }

    static final class IntMath {
        public static int gcd(int a, int b) {
    /*
     * The reason we require both arguments to be >= 0 is because otherwise, what do you return on
     * gcd(0, Integer.MIN_VALUE)? BigInteger.gcd would return positive 2^31, but positive 2^31 isn't
     * an int.
     */
            MathPreconditions.checkNonNegative("a", a);
            MathPreconditions.checkNonNegative("b", b);
            if (a == 0) {
                // 0 % b == 0, so b divides a, but the converse doesn't hold.
                // BigInteger.gcd is consistent with this decision.
                return b;
            } else if (b == 0) {
                return a; // similar logic
            }
    /*
     * Uses the binary GCD algorithm; see http://en.wikipedia.org/wiki/Binary_GCD_algorithm. This is
     * >40% faster than the Euclidean algorithm in benchmarks.
     */
            int aTwos = Integer.numberOfTrailingZeros(a);
            a >>= aTwos; // divide out all 2s
            int bTwos = Integer.numberOfTrailingZeros(b);
            b >>= bTwos; // divide out all 2s
            while (a != b) { // both a, b are odd
                // The key to the binary GCD algorithm is as follows:
                // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
                // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.

                // We bend over backwards to avoid branching, adapting a technique from
                // http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax

                int delta = a - b; // can't overflow, since a and b are nonnegative

                int minDeltaOrZero = delta & (delta >> (Integer.SIZE - 1));
                // equivalent to Math.min(delta, 0)

                a = delta - minDeltaOrZero - minDeltaOrZero; // sets a to Math.abs(a - b)
                // a is now nonnegative and even

                b += minDeltaOrZero; // sets b to min(old a, b)
                a >>= Integer.numberOfTrailingZeros(a); // divide out all 2s, since 2 doesn't divide b
            }
            return a << Math.min(aTwos, bTwos);
        }

        private IntMath() {
        }

    }
}

