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;
int get() {
  char ch;
  while (ch = getchar(), (ch < '0' || ch > '9') && ch != '-')
    ;
  if (ch == '-') {
    int s = 0;
    while (ch = getchar(), ch >= '0' && ch <= '9') s = s * 10 + ch - '0';
    return -s;
  }
  int s = ch - '0';
  while (ch = getchar(), ch >= '0' && ch <= '9') s = s * 10 + ch - '0';
  return s;
}
const int N = 1e5 + 5;
const int L = (1 << 8) + 5;
int n;
int a[N];
int f[L];
int que[L];
int lst[L];
struct operation {
  int x, y, z;
  operation(const int x_ = 0, const int y_ = 0, const int z_ = 0) {
    x = x_;
    y = y_;
    z = z_;
  }
} op[N];
int tmp[N];
int main() {
  n = get();
  for (int i = 1; i <= n; i++) a[i] = get();
  int l = min(n, 8);
  for (int i = 0; i <= (1 << l) - 1; i++) f[i] = -1;
  f[0] = 0;
  int he = 0, ta = 1;
  que[1] = 0;
  while (he < ta) {
    int u = que[++he];
    for (int x = 0; x <= l - 1; x++)
      for (int y = x + 1; y <= l - 1; y++) {
        int z = y + (y - x);
        if (z < l) {
          int v = u ^ (1 << x) ^ (1 << y) ^ (1 << z);
          if (f[v] == -1) {
            f[v] = f[u] + 1;
            que[++ta] = v;
            lst[v] = u;
          }
        }
      }
  }
  if (n < 8) {
    int u = 0;
    for (int i = 1; i <= n; i++)
      if (a[i]) u |= (1 << (i - 1));
    int m = 0;
    if (f[u] == -1 || f[u] > (n / 3) + 12)
      printf("NO\n");
    else {
      for (int now = u; now; now = lst[now]) {
        int v = now ^ lst[now];
        m++;
        for (int i = 0; i <= n - 1; i++)
          if (((1 << i) & v) > 0) {
            if (!op[m].x)
              op[m].x = i + 1;
            else {
              if (!op[m].y)
                op[m].y = i + 1;
              else
                op[m].z = i + 1;
            }
          }
      }
      printf("YES\n%d\n", m);
      for (int i = 1; i <= m; i++)
        printf("%d %d %d\n", op[i].x, op[i].y, op[i].z);
    }
    return 0;
  }
  int m = 0;
  for (int st = 1; n - st >= 8; st += 3) {
    int cnt = a[st] + a[st + 1] + a[st + 2];
    if (n - (st + 1) < 8) cnt -= a[st + 1];
    if (n - (st + 2) < 8) cnt -= a[st + 2];
    if (cnt == 0) continue;
    if (cnt == 3) {
      a[st] ^= 1, a[st + 1] ^= 1, a[st + 2] ^= 1;
      op[++m] = operation(st, st + 1, st + 2);
    }
    if (cnt == 1) {
      int x = 0;
      for (int i = st; i <= st + 2; i++)
        if (a[i]) {
          x = i;
          break;
        }
      if (n - x >= 8) {
        a[x] ^= 1, a[x + 3] ^= 1, a[x + 6] ^= 1;
        op[++m] = operation(x, x + 3, x + 6);
      }
    }
    if (cnt == 2) {
      bool can = 0;
      for (int x1 = st; x1 <= st + 5; x1++) {
        for (int d1 = 1; d1 <= 5; d1++) {
          for (int x2 = st; x2 <= st + 5; x2++) {
            for (int d2 = 1; d2 <= 5; d2++) {
              for (int i = st; i <= st + 5; i++) tmp[i] = a[i];
              if (x1 + d1 + d1 <= n && x2 + d2 + d2 <= n) {
                tmp[x1] ^= 1, tmp[x1 + d1] ^= 1, tmp[x1 + d1 + d1] ^= 1;
                tmp[x2] ^= 1, tmp[x2 + d2] ^= 1, tmp[x2 + d2 + d2] ^= 1;
                can = 1;
                for (int i = st; i <= st + 5; i++)
                  if (n - i >= 8 && tmp[i]) {
                    can = 0;
                    break;
                  }
                if (can) {
                  op[++m] = operation(x1, x1 + d1, x1 + d1 + d1);
                  op[++m] = operation(x2, x2 + d2, x2 + d2 + d2);
                  a[x1] ^= 1, a[x1 + d1] ^= 1, a[x1 + d1 + d1] ^= 1;
                  a[x2] ^= 1, a[x2 + d2] ^= 1, a[x2 + d2 + d2] ^= 1;
                }
              }
              if (can) break;
            }
            if (can) break;
          }
          if (can) break;
        }
        if (can) break;
      }
    }
  }
  int u = 0;
  for (int i = n; i >= n - 7; i--)
    if (a[i]) u |= (1 << (n - i));
  for (int now = u; now; now = lst[now]) {
    int v = now ^ lst[now];
    m++;
    for (int i = 0; i <= 7; i++)
      if (((1 << i) & v) > 0) {
        if (!op[m].z)
          op[m].z = n - i;
        else {
          if (!op[m].y)
            op[m].y = n - i;
          else
            op[m].x = n - i;
        }
      }
  }
  printf("YES\n%d\n", m);
  for (int i = 1; i <= m; i++) printf("%d %d %d\n", op[i].x, op[i].y, op[i].z);
  return 0;
}