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 = 227;
const int M = 5e5 + 7;
const int INF = 1e9 + 7;
int dis[M], p2[N], rr[N], fr[M], a[M];
queue<int> q;
struct op {
  int l, m, r;
} p[M];
int n, vf, cm = 0;
void work(int k, bool tt) {
  vf = k;
  p2[0] = 1;
  int cnt = 0;
  for (int i = 1; i <= k; i++) p2[i] = p2[i - 1] << 1;
  for (int i = 1; i <= k; i++) {
    for (int j = 1; j <= k; j++) {
      if (i + j > k) continue;
      if (i - j < 1 && tt) continue;
      int nw = p2[i - 1] + p2[i + j - 1];
      if (i - j) nw += p2[i - j - 1];
      rr[++cnt] = nw;
    }
  }
  memset(dis, 120, sizeof(dis));
  dis[0] = 0;
  q.push(0);
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    for (int j = 1; j <= cnt; j++) {
      if (dis[t ^ rr[j]] > dis[t] + 1) {
        dis[t ^ rr[j]] = dis[t] + 1;
        fr[t ^ rr[j]] = t;
        q.push(t ^ rr[j]);
      }
    }
  }
}
int getb(int L, int R) {
  int ans = 0;
  for (int i = R; i >= L; i--) ans = (ans << 1) | a[i];
  return ans;
}
void pri(int x, int d) {
  if (!x) return;
  int v = fr[x] ^ x, nw = 0, h1, h2, h3;
  for (int i = 0; i <= vf - 1; i++) {
    if (v & p2[i]) {
      nw++;
      if (nw == 1) h1 = i + 1 + d;
      if (nw == 2) h2 = i + 1 + d;
      if (nw == 3) h3 = i + 1 + d;
    }
  }
  if (nw == 2) h3 = h2, h2 = h1, h1 = h2 * 2 - h3;
  p[++cm] = (op){h1, h2, h3};
  a[h1] ^= 1;
  a[h2] ^= 1;
  a[h3] ^= 1;
  pri(fr[x], d);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  if (n < 15) {
    work(n, 1);
    int v = getb(1, n);
    if (dis[v] > INF)
      printf("NO\n");
    else {
      pri(v, 0);
      printf("YES\n");
      printf("%d\n", cm);
      for (int i = 1; i <= cm; i++)
        printf("%d %d %d\n", p[i].l, p[i].m, p[i].r);
    }
  } else {
    work(15, 0);
    int L, R;
    for (R = n, L = n - 14; L > 15; L -= 15, R -= 15) {
      int q = getb(L, R);
      pri(q, L - 1);
    }
    work(15, 1);
    int q = getb(1, 15);
    pri(q, 0);
    int r = getb(L, L + 14);
    pri(r, L - 1);
    printf("YES\n");
    printf("%d\n", cm);
    for (int i = 1; i <= cm; i++) printf("%d %d %d\n", p[i].l, p[i].m, p[i].r);
  }
  return 0;
}