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 = 100005;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - 48, ch = getchar();
  return x * f;
}
int n;
int a[N];
int m = 0;
struct Perf {
  int x, y, z;
  Perf() {}
  Perf(int _x, int _y, int _z) { x = _x, y = _y, z = _z; }
} p[N];
int find(int x, int dx) {
  while (!a[x] && 1 <= x && x <= n) x += dx;
  return x;
}
void pef(int x, int y, int z) {
  a[x] ^= 1, a[y] ^= 1, a[z] ^= 1;
  p[++m] = Perf(x, y, z);
}
int gettot() {
  int tot = 0;
  for (int i = 1; i <= n; i++) tot += a[i];
  return tot;
}
void del(int x) {
  pef(x - 6, x - 3, x);
  pef(x - 5, x - 4, x - 3);
  pef(x - 6, x - 5, x - 4);
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  int L = 1, R = n;
  while (L + 2 <= R) {
    if (a[L] && a[L + 1] && a[L + 2]) {
      pef(L, L + 1, L + 2);
      L += 3;
      continue;
    }
    if (a[R] && a[R - 1] && a[R - 2]) {
      pef(R - 2, R - 1, R);
      a[R - 2] = a[R - 1] = a[R] = 0;
      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) {
      pef(L, l, l * 2 - L);
      continue;
    } else if (r != R - 1 && 2 * r - R >= L) {
      pef(2 * r - R, r, R);
      continue;
    } else if (l == L + 1 && r == R - 1) {
      if ((R - L) % 2 == 0) {
        int m = (L + R) / 2;
        pef(L, m, R);
        pef(L + 1, m, R - 1);
        continue;
      } else {
        int m1 = (L + R) / 2, m2 = m1 + 1;
        pef(L, m1, R - 1);
        pef(L + 1, m2, R);
        continue;
      }
    } else if (l == L + 1 && 2 * r - R >= L) {
      pef(2 * r - R, r, R);
      continue;
    } else if (r == R - 1 && 2 * l - L <= R) {
      pef(L, l, l * 2 - L);
      continue;
    } else if (l == L + 1)
      pef(L, l, l + 1);
    else if (r == R - 1)
      pef(r - 1, r, R);
    else
      break;
  }
  if (gettot() > 0) {
    int l = find(1, 1);
    int r = find(n, -1);
    if (l != r) {
      while (r + 3 <= min(9, n)) {
        pef(r, r + 1, r + 2);
        pef(r + 1, r + 2, r + 3);
        r += 3;
      }
      while (l + 3 <= min(9, n)) {
        pef(l, l + 1, l + 2);
        pef(l + 1, l + 2, l + 3);
        l += 3;
      }
      if (gettot()) {
        if (l >= 7 && r >= 7) {
          del(l);
          del(r);
        } else {
          if ((l + r) % 2 == 0) return puts("NO"), 0;
          if (l + 1 != r) pef(l + 1, (l + r + 1) / 2, r);
          if (l + 2 <= n)
            pef(l, l + 1, l + 2), l = r = l + 2;
          else
            pef(l - 1, l, l + 1), l = r = l - 1;
        }
      }
    }
    if (gettot()) {
      while (l + 3 <= min(9, n)) {
        pef(l, l + 1, l + 2);
        pef(l + 1, l + 2, l + 3);
        l += 3;
      }
      if (l < 7) return puts("NO"), 0;
      del(l);
    }
  }
  puts("YES");
  printf("%d\n", m);
  for (int i = 1; i <= m; i++) printf("%d %d %d\n", p[i].x, p[i].y, p[i].z);
  return 0;
}