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 read() {
  int w = 0, f = 1;
  char c = ' ';
  while (c < '0' || c > '9') c = getchar(), f = c == '-' ? -1 : f;
  while (c >= '0' && c <= '9') w = w * 10 + c - 48, c = getchar();
  return w * f;
}
struct node {
  int x;
  vector<int> s;
  node() { x = 0; }
} t[1 << 6];
vector<node> f[14];
bool vis[1 << 13];
int ans[100005 / 3 + 15][3], cnt;
void init() {
  for (int i = 1; i <= 13; i++) {
    f[i].resize(1 << i);
    for (int j = 0; j < (1 << i); j++) vis[j] = 0, f[i][j].x = -1;
    queue<node> q;
    q.push(node()), vis[0] = 1;
    while (!q.empty()) {
      node x = q.front();
      q.pop();
      f[i][x.x] = x;
      for (int j = 0; j < i - 2; j++)
        for (int k = 1; j + k * 2 < i; k++) {
          node y = x;
          for (int l = 0; l <= 2; l++)
            y.x ^= 1 << (j + k * l), y.s.push_back(j + k * l);
          if (!vis[y.x]) {
            q.push(y);
            vis[y.x] = 1;
          }
        }
    }
  }
  for (int i = 0; i < (1 << 6); i++) vis[i] = 0;
  queue<node> q;
  q.push(node()), vis[0] = 1;
  while (!q.empty()) {
    node x = q.front();
    q.pop();
    t[x.x] = x;
    for (int j = 0; j < 6; j++)
      for (int k = 1; j + k * 2 < 11; k++) {
        node y = x;
        for (int l = 0; l <= 2; l++)
          y.x ^= (j + k * l < 6) ? (1 << (j + k * l)) : 0,
              y.s.push_back(j + k * l);
        if (!vis[y.x]) {
          q.push(y);
          vis[y.x] = 1;
        }
      }
  }
}
int n, a[100005];
void work(int x) {
  int now = 0, s = 0;
  for (int i = x; i < x + 6; i++) now |= a[i] << (i - x);
  for (auto i : t[now].s) {
    ans[cnt][s++] = x + i;
    a[x + i] ^= 1;
    if (s == 3) cnt++, s = 0;
  }
}
signed main() {
  init();
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1;; i += 6)
    if (n - i + 1 >= 14)
      work(i);
    else {
      int now = 0, s = 0;
      for (int j = i; j <= n; j++) now |= a[j] << (j - i);
      if (f[n - i + 1][now].x == -1) return puts("NO"), 0;
      for (auto j : f[n - i + 1][now].s) {
        ans[cnt][s++] = i + j;
        if (s == 3) cnt++, s = 0;
      }
      break;
    }
  printf("YES\n%d\n", cnt);
  for (int i = 0; i < cnt; i++)
    for (int j = 0; j <= 2; j++) printf("%d%c", ans[i][j], j == 2 ? '\n' : ' ');
  return 0;
}