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.*;
import java.util.*;

import static java.lang.Math.*;
import java.math.BigInteger;

@SuppressWarnings("unchecked")
public class Main {

	final static boolean fileIO = false;
	final static boolean DEBUG = false;


	final static int INF = 0x7FFFFFFF;
	final static int EPS = (int)1e9 + 7;

	static class Pair<K,V> {
		K fs;
		V sc;
		public Pair(K fs, V sc) { this.fs = fs; this.sc = sc; }
		@Override
		public String toString() { return fs.toString() + " " + sc.toString(); }
	}

	static class PLL {
		long fs;
		long sc;
		int id;
		public PLL(long fs, long sc, int id) { this.fs = fs; this.sc = sc; this.id = id; }
		public PLL(long fs, long sc) { this.fs = fs; this.sc = sc; this.id = -1; }
		@Override
		public String toString() { return Long.toString(fs) + " " + Long.toString(sc); }
	}

	static class PII {
		int fs;
		int sc;
		int id;
		public PII(int fs, int sc, int id) { this.fs = fs; this.sc = sc; this.id = id; }
		public PII(int fs, int sc) { this.fs = fs; this.sc = sc; this.id = -1; }
		@Override
		public String toString() { return Integer.toString(fs) + " " + Integer.toString(sc); }
	}

	static class PSI {
		String fs;
		int sc;
		int id;
		public PSI(String fs, int sc, int id) { this.fs = fs; this.sc = sc; this.id = id; }
		public PSI(String fs, int sc) { this.fs = fs; this.sc = sc; this.id = -1; }
		@Override
		public String toString() { return fs + " " + Integer.toString(sc); }
	}

	public static void main(String args[]) throws IOException {
		InputStream is;
		OutputStream os;
		if (fileIO) {
			is = new FileInputStream("input.txt");
			os = new FileOutputStream("output.txt");
		} else {
			is = System.in;
			os = System.out;
		}
		InputReader in = new InputReader(is);
		PrintWriter out = new PrintWriter(os);
		new Task().solve(in, out);
		out.close();
	}

	static class Task {

		static int gcd(int a, int b) {
			while (b > 0) {
				int c = a;
				a = b;
				b = c % b;
			}
			return a;
		}


		public void solve(InputReader in, PrintWriter out) {
			int n = in.nI();
			Integer a[] = in.nIA(n);
			out.println("YES");
			int g = 0;
			for (int v : a) g = gcd(g, v);
			if (g > 1) {
				out.println("0");
			} else {
				int ans = 0;
				for (int i = 0; i < n; ++i) {
					if ((a[i] & 1) == 1) {
						if (i < n - 1 && (a[i + 1] & 1) == 1) {
							++ans;
							++i;
						} else {
							ans += 2;
						}
					}
				}
				out.println(ans);
			}

		}
	}


	static class InputReader {

		private StringTokenizer tokenizer;
		private BufferedReader reader;

		public InputReader(InputStream is) {
			tokenizer = null;
			reader = new BufferedReader(new InputStreamReader(is), 32768);
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null) return null;
					tokenizer = new StringTokenizer(line);
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public Integer nI() { return Integer.parseInt(next()); }
		public Integer[] nIA(int n) {
			Integer ret[] = new Integer[n];
			int i = 0;
			while (n-- > 0) ret[i++] = nI();
			return ret;
		}
		public Long nL() { return Long.parseLong(next()); }
		public Long[] nLA(int n) {
			Long ret[] = new Long[n];
			int i = 0;
			while (n-- > 0) ret[i++] = nL();
			return ret;
		}
	}
}