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 = 100010;
int n;
vector<int> a(N);
vector<tuple<int, int, int> > v, tb[70];
void flip(vector<int>& ve, tuple<int, int, int>& op) {
  ve[get<0>(op)] ^= 1;
  ve[get<1>(op)] ^= 1;
  ve[get<2>(op)] ^= 1;
}
void pre() {
  vector<tuple<int, int, int> > op;
  for (int i = 1; i * 2 < 11; i++) {
    for (int j = 0; j + i * 2 < 11; j++) {
      op.push_back(tuple<int, int, int>(j, j + i, j + i * 2));
    }
  }
  vector<int> r(11, 0);
  auto cal = [&r]() {
    int res = 0;
    for (int i = 5; i < 11; i++) res = res * 2 + r[i];
    return res;
  };
  for (auto it = op.begin(); it != op.end(); it++) {
    flip(r, *it);
    int x = cal();
    if (x && tb[x].empty()) tb[x].push_back(*it);
    for (auto it2 = next(it); it2 != op.end(); it2++) {
      flip(r, *it2);
      int y = cal();
      if (y && tb[y].empty()) tb[y].push_back(*it), tb[y].push_back(*it2);
      flip(r, *it2);
    }
    flip(r, *it);
  }
}
bool bf() {
  vector<tuple<int, int, int> > op;
  for (int i = 1; i * 2 < n; i++) {
    for (int j = 1; j + i * 2 <= n; j++) {
      op.push_back(tuple<int, int, int>(j, j + i, j + i * 2));
    }
  }
  vector<int> r(a.begin(), a.begin() + n + 1);
  int s = op.size();
  for (int i = 0; i < (1 << s); i++) {
    vector<int> ve(n + 1, 0);
    for (int j = 0; j < s; j++) {
      if (1 & (i >> j)) flip(ve, op[j]);
    }
    if (ve == r) {
      puts("YES");
      printf("%d\n", __builtin_popcount(i) + v.size());
      for (int j = 0; j < s; j++) {
        if (1 & (i >> j)) {
          printf("%d %d %d\n", get<0>(op[j]), get<1>(op[j]), get<2>(op[j]));
        }
      }
      return 1;
    }
  }
  puts("NO");
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  if (n < 11)
    bf();
  else {
    pre();
    for (; n > 10; n -= 6) {
      int mask = 0;
      for (int i = n - 5; i <= n; i++) mask = mask * 2 + a[i];
      for (tuple<int, int, int> i : tb[mask]) {
        tuple<int, int, int> tmp = tuple<int, int, int>(
            get<0>(i) + n - 10, get<1>(i) + n - 10, get<2>(i) + n - 10);
        v.push_back(tmp);
        flip(a, tmp);
      }
    }
    n = 10;
    if (bf()) {
      for (int i = 0; i < (int)v.size(); i++) {
        printf("%d %d %d\n", get<0>(v[i]), get<1>(v[i]), get<2>(v[i]));
      }
    }
  }
  return 0;
}