Problem: You are given an array a of length n that consists of zeros and ones.

You can perform the following operation multiple times. The operation consists of two steps: 

  1. Choose three integers 1 ≤ x < y < z ≤ n, that form an arithmetic progression (y - x = z - y). 
  2. Flip the values a_x, a_y, a_z (i.e. change 1 to 0, change 0 to 1). 



Determine if it is possible to make all elements of the array equal to zero. If yes, print the operations that lead the the all-zero state. Your solution should not contain more than (⌊ n/3 ⌋ + 12) operations. Here ⌊ q ⌋ denotes the number q rounded down. We can show that it is possible to make all elements equal to zero in no more than this number of operations whenever it is possible to do so at all.

Input

The first line contains a single integer n (3 ≤ n ≤ 10^5) — the length of the array.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 1) — the elements of the array.

Output

Print "YES" (without quotes) if the answer exists, otherwise print "NO" (without quotes). You can print each letter in any case (upper or lower).

If there is an answer, in the second line print an integer m (0 ≤ m ≤ (⌊ n/3 ⌋ + 12)) — the number of operations in your answer.

After that in (i + 2)-th line print the i-th operations — the integers x_i, y_i, z_i. You can print them in arbitrary order.

Examples

Input

5
1 1 0 1 1


Output

YES
2
1 3 5
2 3 4


Input

3
0 1 0


Output

NO

Note

In the first sample the shown output corresponds to the following solution: 

  * 1 1 0 1 1 (initial state); 
  * 0 1 1 1 0 (the flipped positions are the first, the third and the fifth elements); 
  * 0 0 0 0 0 (the flipped positions are the second, the third and the fourth elements). 



Other answers are also possible. In this test the number of operations should not exceed ⌊ 5/3 ⌋ + 12 = 1 + 12 = 13.

In the second sample the only available operation is to flip all the elements. This way it is only possible to obtain the arrays 0 1 0 and 1 0 1, but it is impossible to make all elements equal to zero.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
    private static final int c = (int) (1e5 + 10);

    static void solve0(int l, int r) {
        ArrayList<int[]> p = new ArrayList<>();
        int[] t = new int[c];
        int a1, a2;

        for (int i = l; i <= r; i++) for (int j = i + 2; j <= r; j += 2) p.add(new int[]{i, j});
        OUT:
        for (int i = 0; i < 1 << p.size(); i++) {
            System.arraycopy(a, l, t, l, r - l + 1);
            for (int j = 0; j < p.size(); j++)
                if ((i >> j & 1) == 1) {
                    a1 = p.get(j)[0];
                    a2 = p.get(j)[1];
                    t[a1] ^= 1;
                    t[a2] ^= 1;
                    t[a1 + a2 >> 1] ^= 1;
                }
            for (int j = l; j <= r; j++) if (t[j] == 1) continue OUT;
            for (int j = 0; j < p.size(); j++)
                if ((i >> j & 1) == 1) ans.add(p.get(j));

            io.println("YES");
            io.println(ans.size());
            for (int[] v : ans) io.println(v[0] + " " + (v[0] + v[1] >> 1) + " " + v[1]);
            return;
        }
        io.println("NO");
    }


    //坚定不移使左三或右三全变0

    static void solve(int l, int r) {
        if (r - l + 1 <= 8) {
            while (l > 1 && r - l + 1 < 8) l--;
            while (r < n && r - l + 1 < 8) r++;
            solve0(l, r);
            return;
        }
        if (a[l] == 0) {
            solve(l + 1, r);
            return;
        }
        if (a[r] == 0) {
            solve(l, r - 1);
            return;
        }
        if (a[l + 1] == 1 && a[l + 2] == 1) {
            flip_add(l, l + 2);
            solve(l + 3, r);
            return;
        }
        if (a[r - 1] == 1 && a[r - 2] == 1) {
            flip_add(r - 2, r);
            solve(l, r - 3);
            return;
        }
        if (a[l] == 1 && a[l + 2] == 1) {
            flip_add(l, l + 4);
            solve(l + 3, r);
            return;
        }
        if (a[r - 2] == 1 && a[r] == 1) {
            flip_add(r - 4, r);
            solve(l, r - 3);
            return;
        }
        if (a[l + 1] == 0 && a[l + 2] == 0) {
            flip_add(l, l + 6);
            solve(l + 3, r);
            return;
        }
        if (a[r - 1] == 0 && a[r - 2] == 0) {
            flip_add(r - 6, r);
            solve(l, r - 3);
            return;
        }
        if ((r - l + 1) % 2 == 1) {
            flip_add(l, r);
            flip_add(l + 1, r - 1);
            solve(l + 3, r - 3);
        } else {
            flip_add(l, r - 1);
            flip_add(l + 1, r);
            solve(l + 3, r - 3);
        }
    }

    //一边操作一边记录
    static ArrayList<int[]> ans = new ArrayList<>();

    static IO io = new IO();
    static int n;
    static int[] a = new int[c];

    public static void main(String[] args) {
        n = io.nextInt();
        for (int i = 1; i <= n; i++) a[i] = io.nextInt();
        solve(1, n);
    }

    static void add(int i, int j, ArrayList<int[]> al) {
        al.add(new int[]{i, j});
    }

    static void flip_add(int l, int r) {
        a[l] ^= 1;
        a[r] ^= 1;
        a[l + r >> 1] ^= 1;
        ans.add(new int[]{l, r});
    }

    static class IO {

        BufferedInputStream din;
        final int BUFFER_SIZE = 1 << 16;
        byte[] buffer;
        int byteRead, bufferPoint;

        StringBuilder builder;
        PrintWriter pw;

        public IO() {
            din = new BufferedInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPoint = byteRead = 0;

            builder = new StringBuilder();
            pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
                    System.out
            )));
        }

        int read() {
            if (bufferPoint >= byteRead) {
                try {
                    byteRead = din.read(buffer, bufferPoint = 0, BUFFER_SIZE);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (byteRead == -1) buffer[0] = -1;
            }
            return buffer[bufferPoint++];
        }

        int peek() {
            if (byteRead == -1) return -1;
            if (bufferPoint >= byteRead) {
                try {
                    byteRead = din.read(buffer, bufferPoint = 0, BUFFER_SIZE);
                } catch (IOException e) {
                    return -1;
                }
                if (byteRead <= 0) return -1;
            }
            return buffer[bufferPoint];
        }

        boolean hasNext() {
            int c = peek();
            while (c != -1 && c <= ' ') {
                read();
                c = peek();
            }
            return c != -1;
        }

        char nextChar() {
            int c = read();
            while (c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1) {
                c = read();
            }
            return (char) c;
        }

        double nextDouble() {
            double ret = 0, div = 1;
            int c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }
            if (neg)
                return -ret;
            return ret;
        }

        String nextLine() {
            byte[] strBuf = new byte[64];
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    if (cnt == 0) {
                        continue;
                    } else {
                        break;
                    }
                }
                if (strBuf.length == cnt) {
                    strBuf = Arrays.copyOf(strBuf, strBuf.length * 2);
                }
                strBuf[cnt++] = (byte) c;
            }
            return new String(strBuf, 0, cnt);
        }


        String next() {
            byte[] strBuf = new byte[64];
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (Character.isWhitespace(c)) {
                    if (cnt == 0) {
                        continue;
                    } else {
                        break;
                    }
                }
                if (strBuf.length == cnt) {
                    strBuf = Arrays.copyOf(strBuf, strBuf.length * 2);
                }
                strBuf[cnt++] = (byte) c;
            }
            return new String(strBuf, 0, cnt);
        }

        int nextInt() {
            int ans = 0;
            int c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ans = ans * 10 + c - '0';
            } while ('0' <= (c = read()) && c <= '9');
            bufferPoint--;
            return neg ? -ans : ans;
        }

        long nextLong() {
            long ans = 0;
            int c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do {
                ans = ans * 10 + c - '0';
            } while ('0' <= (c = read()) && c <= '9');
            bufferPoint--;
            return neg ? -ans : ans;
        }

        void println(Object o) {
            pw.println(o);
            pw.flush();
        }

        void print(Object o) {
            pw.print(o);
            pw.flush();
        }

        void printf(String format, Object... objects) {
            pw.printf(format, objects);
            pw.flush();
        }

        void close() {
            pw.close();
        }

        void done(Object o) {
            print(o);
            close();
        }

    }
}