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;
namespace Base {
const int inf = 0x3f3f3f3f, INF = 0x7fffffff;
const long long infll = 0x3f3f3f3f3f3f3f3fll, INFll = 0x7fffffffffffffffll;
template <typename T>
void read(T &x) {
  x = 0;
  int fh = 1;
  double num = 1.0;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') fh = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  if (ch == '.') {
    ch = getchar();
    while (isdigit(ch)) {
      num /= 10;
      x = x + num * (ch - '0');
      ch = getchar();
    }
  }
  x = x * fh;
}
template <typename T>
void chmax(T &x, T y) {
  x = x < y ? y : x;
}
template <typename T>
void chmin(T &x, T y) {
  x = x > y ? y : x;
}
}  // namespace Base
using namespace Base;
const int N = 100010;
int n, a[N], q[N], use[N], pre[N], prel[N], prem[N], prer[N], num, l[N], m[N],
    r[N];
void force(int *a, int n, int id) {
  int tmp = 0;
  for (int i = 1; i <= n; i++) tmp = tmp + (a[i] << (i - 1));
  int pl = 1, pr = 1;
  q[1] = 0;
  use[0] = true;
  while (pl <= pr) {
    int x = q[pl++];
    for (int i = 1; i <= n; i++)
      for (int j = i + 1; j <= n; j++) {
        int k = j + (j - i);
        if (k > n) continue;
        int nxt = x ^ (1 << (i - 1)) ^ (1 << (j - 1)) ^ (1 << (k - 1));
        if (use[nxt] == false) {
          q[++pr] = nxt;
          use[nxt] = true;
          pre[nxt] = x;
          prel[nxt] = i;
          prem[nxt] = j, prer[nxt] = k;
        }
      }
  }
  if (use[tmp] == false) {
    printf("NO\n");
    exit(0);
  }
  printf("YES\n");
  while (tmp != 0) {
    num++;
    l[num] = prel[tmp] + id, m[num] = prem[tmp] + id, r[num] = prer[tmp] + id;
    tmp = pre[tmp];
  }
  printf("%d\n", num);
  for (int i = 1; i <= num; i++) printf("%d %d %d\n", l[i], m[i], r[i]);
}
void doit(int nl, int nm, int nr) {
  num++;
  l[num] = nl, m[num] = nm, r[num] = nr;
  a[nl] ^= 1, a[nm] ^= 1, a[nr] ^= 1;
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]);
  int pl = 1, pr = n;
  while (pr - pl + 1 > 12) {
    if (a[pl] == 0) {
      pl++;
      continue;
    }
    if (a[pr] == 0) {
      pr--;
      continue;
    }
    if (a[pl] + a[pl + 1] + a[pl + 2] == 3) {
      doit(pl, pl + 1, pl + 2);
      continue;
    }
    if (a[pr] + a[pr - 1] + a[pr - 2] == 3) {
      doit(pr - 2, pr - 1, pr);
      continue;
    }
    if ((pr - pl) % 2 == 0) {
      doit(pl, (pl + pr) / 2, pr);
      continue;
    }
    if (a[pl] != a[pl + 1] && a[pl] == a[pl + 2]) {
      doit(pl, pl + 2, pl + 4);
      continue;
    }
    if (a[pr] != a[pr - 1] && a[pr] == a[pr - 2]) {
      doit(pr - 4, pr - 2, pr);
      continue;
    }
    doit(pl, (pl + pr - 1) / 2, pr - 1);
  }
  if (n <= 12)
    force(a, n, 0);
  else
    force(a + pl - 1, 12, pl - 1);
  return 0;
}