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 MAXN = 1e5;
const int oops = 1 << 20;
const int SMALLN = 11;
struct Triple {
  int a, b, c;
};
int best[40][1 << 15];
int decision[40][1 << 15];
vector<Triple> triples, minitriples;
int arr[MAXN + 5];
int n;
void gen(int K, int n, vector<Triple>& triples) {
  for (int i = 0; i < n; i++) {
    for (int k = 1; k <= K && i + 2 * k < n; k++) {
      triples.push_back({i, i + k, i + k + k});
    }
  }
}
int solve(int t, int mask) {
  if (t == triples.size()) {
    if (mask == 0) return 0;
    return oops;
  }
  int& ret = best[t][mask];
  if (~ret) return ret;
  decision[t][mask] = 1;
  ret = 1 + solve(t + 1, mask ^ (1 << triples[t].a) ^ (1 << triples[t].b) ^
                             (1 << triples[t].c));
  int other = solve(t + 1, mask);
  if (other < ret) {
    ret = other;
    decision[t][mask] = 0;
  }
  return ret;
}
void printMask(int mask) {
  for (int i = 0; i < n; i++) printf("%d", !!(mask & (1 << i)));
  printf("\n");
}
vector<Triple> getSteps(int mask) {
  solve(0, mask);
  vector<Triple> ret;
  int t = 0;
  for (int t = 0; mask; t++) {
    if (decision[t][mask]) {
      ret.push_back(triples[t]);
      mask = mask ^ (1 << triples[t].a) ^ (1 << triples[t].b) ^
             (1 << triples[t].c);
    }
  }
  return ret;
}
int main() {
  int c, c2;
  memset(best, -1, sizeof(best));
  scanf("%d", &n);
  gen(n, min(n, SMALLN), triples);
  int wantedMask = 0;
  for (c = 0; c < n; c++) {
    int x;
    scanf("%d", &x);
    if (x) wantedMask |= (1 << c);
    arr[c] = x;
  }
  vector<Triple> ret;
  if (n <= SMALLN) {
    int ans = solve(0, wantedMask);
    if (ans == oops) {
      printf("NO\n");
      return 0;
    } else {
      ret = getSteps(wantedMask);
    }
  } else {
    int kk = 5;
    gen(kk, 2 * kk + 1, minitriples);
    for (c = 0; c + 2 * kk < n; c++) {
      if (!arr[c]) continue;
      int mask = 0;
      for (int i = 0; i < 6; i++) mask |= arr[c + i] << i;
      bool found = false;
      for (int i = 0; i < minitriples.size(); i++) {
        if (((mask ^ (1 << minitriples[i].a) ^ (1 << minitriples[i].b) ^
              (1 << minitriples[i].c)) &
             7) == 0) {
          found = true;
          int i1 = c + minitriples[i].a, i2 = c + minitriples[i].b,
              i3 = c + minitriples[i].c;
          ret.push_back({i1, i2, i3});
          arr[i1] ^= 1;
          arr[i2] ^= 1;
          arr[i3] ^= 1;
          break;
        }
      }
      for (int i = 0; i < minitriples.size() && !found; i++) {
        for (int j = i + 1; j < minitriples.size(); j++) {
          int ix[] = {minitriples[i].a, minitriples[i].b, minitriples[i].c,
                      minitriples[j].a, minitriples[j].b, minitriples[j].c};
          int newMask = mask;
          for (int jj = 0; jj < 6; jj++) newMask ^= 1 << ix[jj];
          if ((newMask & 63) == 0) {
            for (int jj = 0; jj < 6; jj++) arr[ix[jj] += c] ^= 1;
            ret.push_back({ix[0], ix[1], ix[2]});
            ret.push_back({ix[3], ix[4], ix[5]});
            found = true;
            break;
          }
        }
      }
    }
    wantedMask = 0;
    for (int i = n - 1; i >= n - SMALLN; i--)
      wantedMask |= arr[i] << (n - i - 1);
    vector<Triple> lastSteps = getSteps(wantedMask);
    for (Triple step : lastSteps) {
      step.a = n - step.a - 1;
      step.b = n - step.b - 1;
      step.c = n - step.c - 1;
      arr[step.a] ^= 1;
      arr[step.b] ^= 1;
      arr[step.c] ^= 1;
      ret.push_back(step);
    }
  }
  printf("YES\n");
  printf("%d\n", ret.size());
  for (Triple triple : ret) {
    printf("%d %d %d\n", triple.a + 1, triple.b + 1, triple.c + 1);
  }
}