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;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-9;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 60;
const int mods = 1e9 + 7;
const int inv2 = (mods + 1) >> 1;
const int MAXN = 100005;
const int INF = 0x3f3f3f3f;
namespace FastIO {
constexpr int SIZE = (1 << 21) + 1;
int num = 0, f;
char ibuf[SIZE], obuf[SIZE], que[65], *iS, *iT, *oS = obuf,
                                                *oT = obuf + SIZE - 1, c;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char c) {
  *oS++ = c;
  if (oS == oT) flush();
}
inline void getc(char &c) {
  for (c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++);
       !isalpha(c) && c != EOF;
       c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    ;
}
inline void reads(char *st) {
  char c;
  int n = 0;
  getc(st[++n]);
  for (c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++);
       isalpha(c);
       c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    st[++n] = c;
  st[n + 1] = '\0';
}
template <class I>
inline void read(I &x) {
  for (f = 1, c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-') f = -1;
  for (x = 0; c >= '0' && c <= '9';
       c = (iS == iT ? (iT = ((iS = ibuf) + fread(ibuf, 1, SIZE, stdin)),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = (x << 3) + (x << 1) + (c & 15);
  x *= f;
}
template <class I>
inline void print(I x) {
  if (x < 0) putc('-'), x = -x;
  if (!x) putc('0');
  while (x) que[++num] = x % 10 + 48, x /= 10;
  while (num) putc(que[num--]);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_Flusher_;
}  // namespace FastIO
using FastIO ::print;
using FastIO ::putc;
using FastIO ::read;
using FastIO ::reads;
pair<int, int> frm[MAXN];
vector<pair<int, int> > Ans;
int vis[MAXN], a[MAXN], n;
queue<int> que;
void bfs(int x, int n) {
  for (int i = 0; i < 1 << n; ++i) vis[i] = INF, frm[i] = make_pair(0, 0);
  vis[x] = 0, que.push(x);
  while (!que.empty()) {
    int q = que.front();
    que.pop();
    for (int i = 1; i < n - 1; ++i)
      for (int j = 1; j <= i && j <= n - i - 1; ++j) {
        int t = q ^ (1 << i) ^ (1 << (i - j)) ^ (1 << (i + j));
        if (vis[t] != INF) continue;
        vis[t] = vis[q] + 1, frm[t] = make_pair(i, j), que.push(t);
      }
  }
}
signed main() {
  read(n);
  for (int i = 1; i <= n; ++i) read(a[i]);
  if (n > 8) {
    bfs(0, 14);
    for (int j = n; j - 6 >= 8; j -= 6) {
      int t = (a[j - 5] << 8) | (a[j - 4] << 9) | (a[j - 3] << 10) |
              (a[j - 2] << 11) | (a[j - 1] << 12) | (a[j] << 13),
          mn = t;
      for (int k = 0; k < 1 << 8; ++k)
        if (vis[t | k] < vis[mn]) mn = t | k;
      t = mn;
      int Num = 0;
      while (t) {
        ++Num;
        pair<int, int> p = make_pair(frm[t].first + j - 13, frm[t].second);
        Ans.push_back(p);
        a[p.first] ^= 1, a[p.first - p.second] ^= 1, a[p.first + p.second] ^= 1;
        t = t ^ (1 << frm[t].first) ^ (1 << (frm[t].first - frm[t].second)) ^
            (1 << (frm[t].first + frm[t].second));
      }
    }
    n = (n - 8) % 6 + 8;
  }
  int t = 0;
  for (int i = n; i >= 1; --i) t = (t << 1) | a[i];
  bfs(t, n);
  if (vis[0] == INF) {
    putc('N'), putc('O'), putc('\n');
    return 0;
  };
  putc('Y'), putc('E'), putc('S'), putc('\n');
  int nw = 0;
  while (frm[nw].second) {
    Ans.push_back(make_pair(frm[nw].first + 1, frm[nw].second));
    nw = nw ^ (1 << frm[nw].first) ^ (1 << (frm[nw].first - frm[nw].second)) ^
         (1 << (frm[nw].first + frm[nw].second));
  }
  print(Ans.size()), putc('\n');
  for (auto v : Ans)
    print(v.first - v.second), putc(' '), print(v.first), putc(' '),
        print(v.first + v.second), putc('\n');
  return 0;
}