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>
const long long N = 100010;
const long long Q = 10001;
const long long mod = 998244353;
const long long block = sqrt(N);
using namespace std;
int n;
int a[N];
map<vector<int>, pair<int, pair<int, int> > > d;
map<vector<int>, int> f;
vector<pair<int, pair<int, int> > > slow() {
  vector<pair<int, pair<int, int> > > g;
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    v.push_back(a[i]);
  }
  d[v] = {0, {0, 0}};
  queue<vector<int> > q;
  q.push(v);
  while (!q.empty()) {
    v = q.front();
    q.pop();
    int cur = f[v];
    for (int i = 0; i < v.size(); i++) {
      for (int j = i + 1; j < v.size(); j++) {
        int h = j + j - i;
        if (h < v.size()) {
          v[i] ^= 1;
          v[j] ^= 1;
          v[h] ^= 1;
          if (d.find(v) == d.end()) {
            d[v] = {i, {j, h}};
            f[v] = cur + 1;
            q.push(v);
          }
          v[i] ^= 1;
          v[j] ^= 1;
          v[h] ^= 1;
        }
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    v[i] = 0;
  }
  if (d.find(v) == d.end()) {
    return {{-1, {-1, -1}}};
  }
  for (int i = f[v]; i; i--) {
    auto p = d[v];
    g.push_back(p);
    v[p.first] ^= 1;
    v[p.second.first] ^= 1;
    v[p.second.second] ^= 1;
  }
  return g;
}
void upd(vector<pair<int, pair<int, int> > > &v, int a, int b, int c) {
  v.push_back({a, {b, c}});
  ::a[a] ^= 1;
  ::a[b] ^= 1;
  ::a[c] ^= 1;
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int last = -1;
  vector<pair<int, pair<int, int> > > v, g;
  int suka = 0;
  for (int i = 1; i <= n; i += 3) {
    if (i + 12 <= n) {
      vector<int> t;
      if (a[i]) t.push_back(i);
      if (a[i + 1]) t.push_back(i + 1);
      if (a[i + 2]) t.push_back(i + 2);
      if (t.size() == 0) {
        continue;
      } else if (t.size() == 3) {
        upd(v, i, i + 1, i + 2);
        continue;
      }
      if (t.size() == 2 && t[1] == i + 1) {
        if (last == -1) {
          last = i;
          continue;
        }
        if (i + 1 + i + 1 - last - 1 <= n) {
          int h = i + i - last;
          upd(v, last, i, h);
          upd(v, last + 1, i + 1, h + 1);
          last = -1;
        } else {
          suka++;
          int j = (n + last - 1) / 2;
          int h = j + j - last;
          upd(v, last, j, h);
          upd(v, last + 1, j, h - 1);
          last = i;
        }
      } else {
        int j = i + 3;
        if (t.size() == 2) {
          j = t[1];
        }
        upd(v, t[0], j, j + j - t[0]);
      }
    } else {
      if (last != -1) {
        int j = (n + last - 1) / 2;
        int h = j + j - last;
        upd(v, last, j, h);
        upd(v, last + 1, j, h - 1);
        suka++;
      }
      int m = n - i + 1;
      for (int j = 1; j <= m; j++) {
        a[j] = a[j + i - 1];
      }
      n = m;
      g = slow();
      if (g.size() > 0 && g[0].first == -1) {
        cout << "NO"
             << "\n";
        return;
      }
      assert(suka <= 11);
      cout << "YES"
           << "\n";
      cout << v.size() + g.size() << "\n";
      for (auto p : v) {
        cout << p.first << " " << p.second.first << " " << p.second.second
             << "\n";
      }
      for (auto p : g) {
        cout << p.first + i << " " << p.second.first + i << " "
             << p.second.second + i << "\n";
      }
      return;
    }
  }
}
bool mtest = false;
int main() {
  ios_base::sync_with_stdio(0);
  int TE = 1;
  if (mtest) cin >> TE;
  while (TE--) solve();
  return 0;
}