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;
struct node {
  int x, y, z;
  node(int a, int b, int c) { x = a, y = b, z = c; }
};
queue<node> p;
const int maxn = 1e5 + 10;
int n, a[maxn];
void flip(int x, int y, int z) {
  p.push(node(x, y, z));
  a[x] = !a[x];
  a[y] = !a[y];
  a[z] = !a[z];
}
int find(int x, int v) {
  while (!a[x] && 1 <= x && x <= n) x += v;
  return x;
}
int check() {
  int res = 0;
  for (int i = 1; i <= n; i++) res += a[i];
  return res;
}
void del(int x) {
  flip(x - 6, x - 3, x);
  flip(x - 5, x - 4, x - 3);
  flip(x - 6, x - 5, x - 4);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int L = 1, R = n;
  while (L + 2 <= R) {
    if (a[L] && a[L + 1] && a[L + 2]) {
      flip(L, L + 1, L + 2);
      L += 3;
      continue;
    }
    if (a[R] && a[R - 1] && a[R - 2]) {
      flip(R - 2, R - 1, R);
      R -= 3;
    }
    if (!a[L]) {
      L++;
      continue;
    }
    if (!a[R]) {
      R--;
      continue;
    }
    int l = find(L + 1, 1);
    int r = find(R - 1, -1);
    if (l == R) break;
    if (l != L + 1 && 2 * l - L <= R) {
      flip(L, l, l * 2 - L);
      continue;
    } else if (r != R - 1 && 2 * r - R >= L) {
      flip(2 * r - R, r, R);
      continue;
    } else if (l == L + 1 && r == R - 1) {
      if ((R - L) % 2 == 0) {
        int m = (L + R) / 2;
        flip(L, m, R);
        flip(L + 1, m, R - 1);
        continue;
      } else {
        int m = (L + R) / 2;
        flip(L, m, R - 1);
        flip(L + 1, m + 1, R);
        continue;
      }
    } else if (l == L + 1 && 2 * r - R >= L) {
      flip(2 * r - R, r, R);
      continue;
    } else if (r == R - 1 && 2 * l - L <= R) {
      flip(L, l, 2 * l - L);
      continue;
    } else if (l == L + 1)
      flip(L, l, l + 1);
    else if (r == R - 1)
      flip(r - 1, r, R);
    else
      break;
  }
  if (check()) {
    int l = find(1, 1);
    int r = find(n, -1);
    if (l != r) {
      while (r + 3 <= min(9, n)) {
        flip(r, r + 1, r + 2);
        flip(r + 1, r + 2, r + 3);
        r += 3;
      }
      while (l + 3 <= min(9, n)) {
        flip(l, l + 1, l + 2);
        flip(l + 1, l + 2, l + 3);
        l += 3;
      }
      if (check()) {
        if (l >= 7 && r >= 7) {
          del(l), del(r);
        } else {
          if ((l + r) % 2 == 0) return puts("NO"), 0;
          if (l + 1 != r) flip(l + 1, (l + r + 1) / 2, r);
          if (l + 2 <= n)
            flip(l, l + 1, l + 2), l = r = l + 2;
          else
            flip(l - 1, l, l + 1), l = r = l - 1;
        }
      }
    }
    if (check()) {
      while (l + 3 <= min(9, n)) {
        flip(l, l + 1, l + 2);
        flip(l + 1, l + 2, l + 3);
        l += 3;
      }
      if (l < 7) return puts("NO"), 0;
      del(l);
    }
  }
  puts("YES");
  printf("%d\n", p.size());
  while (!p.empty()) {
    printf("%d %d %d\n", p.front().x, p.front().y, p.front().z);
    p.pop();
  }
}