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;
inline long long in() {
  long long x = 0;
  char c = getchar();
  bool neg = false;
  while (c != '-' && ('0' > c || c > '9')) c = getchar();
  if (c == '-') neg = true, c = getchar();
  while ('0' <= c && c <= '9') x = 10 * x + c - '0', c = getchar();
  if (neg) x = -x;
  return x;
}
inline void out(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int l, int r) { return l + rng() % (r - l + 1); }
const int N = 100010;
int n;
int a[N];
struct trc {
  int v, i, j, k;
} tr[N];
vector<trc> ans;
bool dd[N];
queue<int> q;
bool ok = 1;
void bfs(int s, int f, int t) {
  while (!q.empty()) q.pop();
  memset(dd, false, sizeof(dd));
  q.push(s);
  tr[s] = {-1, -1, -1};
  dd[s] = true;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (!u) break;
    for (int i = 1, _c = t - 2; i <= _c; ++i)
      for (int j = i + 1, _c = t - 1; j <= _c; ++j)
        if (2 * j - i <= t) {
          int v = u, k = j * 2 - i;
          if (i > 0) v ^= (1 << (i - 1));
          if (j > 0) v ^= (1 << (j - 1));
          if (k > 0) v ^= (1 << (k - 1));
          if (!dd[v]) q.push(v), tr[v] = {u, i, j, k}, dd[v] = true;
        }
  }
  ok = (ok && dd[0]);
  if (!ok) return;
  int u = 0;
  while (tr[u].v != -1)
    ans.push_back({tr[u].i + f, tr[u].j + f, tr[u].k + f}), u = tr[u].v;
}
void flip(int i, int j) {
  a[i] ^= 1, a[j] ^= 1, a[2 * j - i];
  ans.push_back({i, j, 2 * j - i});
}
int main() {
  n = in();
  for (int i = 1, _c = n; i <= _c; ++i) a[i] = in();
  while (n >= 14) {
    int f = n - 6, s = 0;
    for (int i = n - 5, _c = n; i <= _c; ++i)
      if (a[i]) s = (s | (1ll << (i - n + 6 - 1)));
    if (s == 1) {
      flip(f - 1, f + 0);
    }
    if (s == 2) {
      flip(f - 2, f + 0);
    }
    if (s == 3) {
      flip(f + 0, f + 1);
    }
    if (s == 4) {
      flip(f - 3, f + 0);
    }
    if (s == 5) {
      flip(f - 1, f + 1);
    }
    if (s == 6) {
      flip(f + 1, f + 2);
      flip(f - 1, f + 0);
    }
    if (s == 7) {
      flip(f + 1, f + 2);
    }
    if (s == 8) {
      flip(f - 4, f + 0);
    }
    if (s == 9) {
      flip(f - 2, f + 1);
    }
    if (s == 10) {
      flip(f + 0, f + 2);
    }
    if (s == 11) {
      flip(f + 0, f + 2);
      flip(f - 1, f + 0);
    }
    if (s == 12) {
      flip(f + 2, f + 3);
      flip(f - 2, f + 0);
    }
    if (s == 13) {
      flip(f - 2, f + 1);
      flip(f - 3, f + 0);
    }
    if (s == 14) {
      flip(f + 2, f + 3);
    }
    if (s == 15) {
      flip(f + 2, f + 3);
      flip(f - 1, f + 0);
    }
    if (s == 16) {
      flip(f - 5, f + 0);
    }
    if (s == 17) {
      flip(f - 3, f + 1);
    }
    if (s == 18) {
      flip(f - 1, f + 2);
    }
    if (s == 19) {
      flip(f - 1, f + 2);
      flip(f - 1, f + 0);
    }
    if (s == 20) {
      flip(f + 1, f + 3);
      flip(f - 1, f + 0);
    }
    if (s == 21) {
      flip(f + 1, f + 3);
    }
    if (s == 22) {
      flip(f - 1, f + 2);
      flip(f - 3, f + 0);
    }
    if (s == 23) {
      flip(f + 1, f + 3);
      flip(f - 2, f + 0);
    }
    if (s == 24) {
      flip(f + 3, f + 4);
      flip(f - 3, f + 0);
    }
    if (s == 25) {
      flip(f - 3, f + 1);
      flip(f - 4, f + 0);
    }
    if (s == 26) {
      flip(f - 1, f + 2);
      flip(f - 4, f + 0);
    }
    if (s == 27) {
      flip(f - 1, f + 2);
      flip(f - 2, f + 1);
    }
    if (s == 28) {
      flip(f + 3, f + 4);
    }
    if (s == 29) {
      flip(f + 3, f + 4);
      flip(f - 1, f + 0);
    }
    if (s == 30) {
      flip(f + 3, f + 4);
      flip(f - 2, f + 0);
    }
    if (s == 31) {
      flip(f + 3, f + 4);
      flip(f + 0, f + 1);
    }
    if (s == 32) {
      flip(f - 6, f + 0);
    }
    if (s == 33) {
      flip(f - 4, f + 1);
    }
    if (s == 34) {
      flip(f - 2, f + 2);
    }
    if (s == 35) {
      flip(f - 2, f + 2);
      flip(f - 1, f + 0);
    }
    if (s == 36) {
      flip(f + 0, f + 3);
    }
    if (s == 37) {
      flip(f + 0, f + 3);
      flip(f - 1, f + 0);
    }
    if (s == 38) {
      flip(f + 0, f + 3);
      flip(f - 2, f + 0);
    }
    if (s == 39) {
      flip(f + 1, f + 2);
      flip(f - 6, f + 0);
    }
    if (s == 40) {
      flip(f + 2, f + 4);
      flip(f - 2, f + 0);
    }
    if (s == 41) {
      flip(f - 4, f + 1);
      flip(f - 4, f + 0);
    }
    if (s == 42) {
      flip(f + 2, f + 4);
    }
    if (s == 43) {
      flip(f + 2, f + 4);
      flip(f - 1, f + 0);
    }
    if (s == 44) {
      flip(f + 0, f + 3);
      flip(f - 4, f + 0);
    }
    if (s == 45) {
      flip(f + 0, f + 3);
      flip(f - 2, f + 1);
    }
    if (s == 46) {
      flip(f + 2, f + 4);
      flip(f - 3, f + 0);
    }
    if (s == 47) {
      flip(f + 2, f + 4);
      flip(f - 1, f + 1);
    }
    if (s == 48) {
      flip(f + 4, f + 5);
      flip(f - 4, f + 0);
    }
    if (s == 49) {
      flip(f - 4, f + 1);
      flip(f - 5, f + 0);
    }
    if (s == 50) {
      flip(f - 2, f + 2);
      flip(f - 5, f + 0);
    }
    if (s == 51) {
      flip(f - 2, f + 2);
      flip(f - 3, f + 1);
    }
    if (s == 52) {
      flip(f + 0, f + 3);
      flip(f - 5, f + 0);
    }
    if (s == 53) {
      flip(f + 1, f + 3);
      flip(f - 6, f + 0);
    }
    if (s == 54) {
      flip(f + 0, f + 3);
      flip(f - 1, f + 2);
    }
    if (s == 55) {
      flip(f + 1, f + 3);
      flip(f - 2, f + 2);
    }
    if (s == 56) {
      flip(f + 4, f + 5);
    }
    if (s == 57) {
      flip(f + 4, f + 5);
      flip(f - 1, f + 0);
    }
    if (s == 58) {
      flip(f + 4, f + 5);
      flip(f - 2, f + 0);
    }
    if (s == 59) {
      flip(f + 4, f + 5);
      flip(f + 0, f + 1);
    }
    if (s == 60) {
      flip(f + 4, f + 5);
      flip(f - 3, f + 0);
    }
    if (s == 61) {
      flip(f + 4, f + 5);
      flip(f - 1, f + 1);
    }
    if (s == 62) {
      flip(f + 3, f + 4);
      flip(f - 2, f + 2);
    }
    if (s == 63) {
      flip(f + 4, f + 5);
      flip(f + 1, f + 2);
    }
    n -= 6;
  }
  int x = 0;
  for (int i = 1, _c = n; i <= _c; ++i)
    if (a[i]) x = (x | (1ll << (i - 1)));
  bfs(x, 0, n);
  if (!ok)
    cout << "NO";
  else {
    cout << "YES\n" << ans.size() << "\n";
    for (auto& x : ans) cout << x.v << " " << x.i << " " << x.j << "\n";
  }
  return 0;
  for (int tt = 0, _c = (1 << 6) - 1; tt <= _c; ++tt) {
    ok = 1;
    bfs(tt, 0, 6);
    cout << "if(s==" << tt << ")";
    cout << "{";
    for (auto& x : ans) {
      cout << "flip(f+" << x.v << ",f+" << x.i << ");";
    }
    cout << "}";
    cout << "\n";
    ans.clear();
  }
}