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 a[100000];
vector<pair<int, int> > ops;
vector<pair<int, int> > sol;
int main() {
  int i;
  int n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  int j;
  if (n <= 10) {
    for (i = 0; i < n; i++) {
      for (j = i + 2; j < n; j += 2) ops.push_back(make_pair(i, j));
    }
    int mm = 0;
    for (i = 0; i < n; i++) {
      if (a[i]) mm |= (1 << i);
    }
    int best = -1, num = 1e9;
    for (i = 0; i < (1 << ops.size()); i++) {
      int m = 0, b = 0;
      for (j = 0; j < ops.size(); j++) {
        if (i & (1 << j)) {
          m ^= (1 << ops[j].first) | (1 << ops[j].second) |
               (1 << ((ops[j].first + ops[j].second) / 2));
          b++;
        }
      }
      if (m == mm) {
        if (b < num) best = i, num = b;
      }
    }
    if (best == -1) {
      printf("NO\n");
      return 0;
    }
    for (i = 0; i < ops.size(); i++) {
      if (best & (1 << i)) sol.push_back(ops[i]);
    }
    printf("YES\n%d\n", sol.size());
    for (i = 0; i < sol.size(); i++)
      printf("%d %d %d\n", sol[i].first + 1,
             (sol[i].first + sol[i].second) / 2 + 1, sol[i].second + 1);
    return 0;
  }
  int p = n - 1;
  while (p >= 11) {
    if (!a[p])
      p--;
    else {
      if (a[p - 1] && a[p - 2]) {
        sol.push_back(make_pair(p - 2, p));
        a[p] ^= 1, a[p - 1] ^= 1, a[p - 2] ^= 1;
        p -= 3;
      } else if (a[p - 2] && !a[p - 1]) {
        sol.push_back(make_pair(p - 4, p));
        a[p] ^= 1, a[p - 2] ^= 1, a[p - 4] ^= 1;
        p -= 3;
      } else if (!a[p - 1] && !a[p - 2]) {
        sol.push_back(make_pair(p - 6, p));
        a[p] ^= 1, a[p - 3] ^= 1, a[p - 6] ^= 1;
        p -= 3;
      } else {
        if (!a[p - 3] && !a[p - 4] && !a[p - 5]) {
          sol.push_back(make_pair(p - 7, p - 1)),
              sol.push_back(make_pair(p - 8, p));
          a[p - 7] ^= 1, a[p - 4] ^= 1, a[p - 1] ^= 1;
          a[p - 8] ^= 1, a[p - 4] ^= 1, a[p] ^= 1;
          p -= 6;
        } else if ((a[p - 3] + a[p - 4] + a[p - 5]) == 1) {
          int q;
          if (a[p - 3])
            q = p - 3;
          else if (a[p - 4])
            q = p - 4;
          else
            q = p - 5;
          sol.push_back(make_pair(2 * q - p, p)),
              sol.push_back(make_pair(p - 11, p - 1));
          a[2 * q - p] ^= 1, a[q] ^= 1, a[p] ^= 1;
          a[p - 11] ^= 1, a[p - 6] ^= 1, a[p - 1] ^= 1;
          p -= 6;
        } else if ((a[p - 3] + a[p - 4] + a[p - 5]) == 2) {
          int q, r;
          if (!a[p - 3])
            q = p - 4, r = p - 5;
          else if (!a[p - 4])
            q = p - 3, r = p - 5;
          else
            q = p - 3, r = p - 4;
          sol.push_back(make_pair(2 * q - p, p)),
              sol.push_back(make_pair(2 * r - (p - 1), p - 1));
          a[2 * q - p] ^= 1, a[q] ^= 1, a[p] ^= 1;
          a[2 * r - (p - 1)] ^= 1, a[r] ^= 1, a[p - 1] ^= 1;
          p -= 6;
        } else {
          sol.push_back(make_pair(p - 5, p - 1)),
              sol.push_back(make_pair(p - 8, p));
          a[p - 5] ^= 1, a[p - 3] ^= 1, a[p - 1] ^= 1;
          a[p - 8] ^= 1, a[p - 4] ^= 1, a[p] ^= 1;
          p -= 6;
        }
      }
    }
  }
  for (i = 0; i < 11; i++) {
    for (j = i + 2; j < min(11, i + 7); j += 2) ops.push_back(make_pair(i, j));
  }
  int mm = 0;
  for (i = 0; i < 11; i++) {
    if (a[i]) mm |= (1 << i);
  }
  int best = -1, num = 1e9;
  for (i = 0; i < (1 << ops.size()); i++) {
    int m = 0, b = 0;
    for (j = 0; j < ops.size(); j++) {
      if (i & (1 << j)) {
        m ^= (1 << ops[j].first) | (1 << ops[j].second) |
             (1 << ((ops[j].first + ops[j].second) / 2));
        b++;
      }
    }
    if (m == mm) {
      if (b < num) best = i, num = b;
    }
  }
  if (best == -1) {
    printf("NO\n");
    return 0;
  }
  for (i = 0; i < ops.size(); i++) {
    if (best & (1 << i)) sol.push_back(ops[i]);
  }
  printf("YES\n%d\n", sol.size());
  for (i = 0; i < sol.size(); i++)
    printf("%d %d %d\n", sol[i].first + 1,
           (sol[i].first + sol[i].second) / 2 + 1, sol[i].second + 1);
  return 0;
}