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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, m, num, a[N], op[N][3];
bool vis[N];
struct node {
  int p, x, y;
  node() {}
  node(int p, int x, int y) : p(p), x(x), y(y) {}
} pre[N];
void add(int x, int y, int z) {
  a[x] ^= 1, a[y] ^= 1, a[z] ^= 1;
  op[++num][0] = x, op[num][1] = y, op[num][2] = z;
}
void solve(int p) {
  int s = 0, ed = min(p + 5, m), q = ed + 1, fi, la, wz[10];
  for (int i = (p); i <= (ed); i++) s += a[i];
  if (!s) return;
  if (s == 6) {
    add(p, p + 1, p + 2);
    add(p + 3, p + 4, p + 5);
    return;
  }
  if (s <= 2) {
    for (int i = (p); i <= (ed); i++)
      if (a[i]) add(i, q, 2 * q - i);
    return;
  }
  if (s == 3) {
    for (int i = (p + 1); i <= (ed - 1); i++)
      if (a[i] && a[i - 1] && a[i + 1]) {
        add(i - 1, i, i + 1);
        return;
      }
    for (int i = (p); i <= (ed); i++)
      if (a[i]) {
        fi = i;
        break;
      }
    for (int i = (ed); i >= (p); i--)
      if (a[i]) {
        la = i;
        break;
      }
    add(fi, la, 2 * la - fi);
    for (int i = (p); i <= (ed); i++)
      if (a[i]) add(i, q, 2 * q - i);
    return;
  }
  if (s == 4) {
    for (int i = (p + 1); i <= (ed - 1); i++)
      if (a[i] && a[i - 1] && a[i + 1]) add(i - 1, i, i + 1);
    s = 0;
    for (int i = (p); i <= (ed); i++) s += a[i];
    if (s == 1) {
      for (int i = (p); i <= (ed); i++)
        if (a[i]) add(i, q, 2 * q - i);
      return;
    }
    *wz = 0;
    for (int i = (p); i <= (ed); i++)
      if (a[i]) wz[++*wz] = i;
    add(wz[1], wz[3], 2 * wz[3] - wz[1]);
    add(wz[2], wz[4], 2 * wz[4] - wz[2]);
    return;
  }
  for (int i = (p); i <= (ed); i++)
    if (!a[i]) la = i - p;
  if (!la) add(p + 1, p + 2, p + 3), add(p + 4, p + 5, p + 6);
  if (la == 1) add(p, p + 2, p + 4), add(p + 3, p + 5, p + 7);
  if (la == 2) add(p, p + 4, p + 8), add(p + 1, p + 3, p + 5);
  if (la == 3) add(p, p + 1, p + 2), add(p + 4, p + 5, p + 6);
  if (la == 4) add(p, p + 1, p + 2), add(p + 3, p + 5, p + 7);
  if (la == 5) add(p + 1, p + 2, p + 3), add(p, p + 4, p + 8);
}
void bfs(int st) {
  int sta = 0;
  for (int i = (st); i <= (n); i++) sta |= a[i] << i - st;
  int len = n - st + 1;
  memset(vis, 0, sizeof(vis));
  queue<int> q;
  q.push(sta);
  pre[sta] = node(0, 0, 0);
  vis[sta] = 1;
  while (!q.empty()) {
    int las = q.front();
    q.pop();
    if (las == 0) {
      puts("YES");
      for (int i = las; i != sta; i = pre[i].p) {
        node x = pre[i];
        add(st + x.x, st + (x.x + x.y) / 2, st + x.y);
      }
      printf("%d\n", num);
      for (int i = (1); i <= (num); i++)
        printf("%d %d %d\n", op[i][0], op[i][1], op[i][2]);
      return;
    }
    for (int i = (0); i <= (len - 1); i++)
      for (int j = i + 2; j < len; j += 2) {
        int now = las;
        now ^= 1 << i;
        now ^= 1 << j;
        now ^= 1 << ((i + j) / 2);
        if (vis[now]) break;
        pre[now] = node(las, i, j);
        vis[now] = 1;
        q.push(now);
      }
  }
  puts("NO");
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  if (n <= 10) return bfs(1), 0;
  m = n - 10;
  for (int i = 1; i <= m; i += 6) solve(i);
  for (int i = (1); i <= (m); i++) assert(!a[i]);
  bfs(m + 1);
  return 0;
}