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>
#pragma warning(disable : 4996)
using namespace std;
int dx[] = {0, 1};
int dy[] = {1, 0};
struct query {
  int l;
  int sz;
};
void say(const vector<query>& qs) {
  cout << qs.size() << endl;
  for (auto q : qs) {
    int sz = q.sz;
    int a = q.l + 1;
    int b = a + sz / 2;
    int c = b + sz / 2;
    printf("%d %d %d\n", a, b, c);
  }
}
void add(vector<query>& anss, vector<int>& v, query q) {
  anss.push_back(q);
  int a = q.l;
  int b = q.l + q.sz / 2;
  int c = b + q.sz / 2;
  v[a] = !v[a];
  v[b] = !v[b];
  v[c] = !v[c];
}
int main() {
  vector<vector<int>> all_oks(14);
  vector<vector<vector<query>>> all_anss(14);
  for (int x = 3; x < 14; ++x) {
    vector<int> oks(1 << x);
    vector<vector<query>> anss(1 << x);
    oks[0] = true;
    queue<int> que;
    que.push(0);
    while (!que.empty()) {
      int now = que.front();
      que.pop();
      for (int sz = 3; sz <= x; sz += 2) {
        for (int a = 0; a <= x - sz; ++a) {
          int next = now;
          int b = a + sz / 2;
          int c = b + sz / 2;
          next ^= (1 << a);
          next ^= (1 << b);
          next ^= (1 << c);
          if (!oks[next]) {
            oks[next] = true;
            anss[next] = anss[now];
            anss[next].push_back(query{a, sz});
            que.push(next);
          }
        }
      }
    }
    all_oks[x] = oks;
    all_anss[x] = anss;
  }
  int N;
  scanf("%d", &N);
  vector<int> v(N);
  for (int i = 0; i < N; ++i) scanf("%d", &v[i]);
  vector<query> my_answer;
  if (N < 14) {
    int num = 0;
    for (int i = 0; i < N; ++i) {
      num += (1 << i) * v[i];
    }
    if (all_oks[N][num]) {
      my_answer = all_anss[N][num];
      cout << "YES" << endl;
      say(my_answer);
    } else {
      cout << "NO" << endl;
    }
  } else {
    int offset = 0;
    while (N - offset >= 14) {
      string st;
      for (int i = 0; i < 6; ++i) {
        if (v[i + offset] == 1)
          st.push_back('1');
        else
          st.push_back('0');
      }
      string pre = st.substr(0, 3);
      int one_cnt = count(pre.begin(), pre.end(), '1');
      if (one_cnt == 3) {
        add(my_answer, v, query{offset, 3});
      } else if (one_cnt == 0) {
      } else if (one_cnt == 1) {
        int place = st.find('1');
        add(my_answer, v, query{offset + place, 7});
      } else if (one_cnt == 2) {
        if (pre == "110") {
          string nex = st.substr(3, 3);
          int nex_one_cnt = count(nex.begin(), nex.end(), '1');
          if (nex_one_cnt == 3) {
            add(my_answer, v, query{offset, 9});
            add(my_answer, v, query{offset + 1, 5});
          } else if (nex_one_cnt == 2) {
            int aa, bb;
            if (nex == "110") {
              aa = 0;
              bb = 1;
            } else if (nex == "101") {
              aa = 0;
              bb = 2;
            } else if (nex == "011") {
              aa = 1;
              bb = 2;
            }
            add(my_answer, v, query{offset, (aa + 3) * 2 + 1});
            add(my_answer, v, query{offset + 1, (bb + 2) * 2 + 1});
          } else if (nex_one_cnt == 1) {
            int aa = nex.find('1');
            add(my_answer, v, query{offset, (aa + 3) * 2 + 1});
            add(my_answer, v, query{offset + 1, 11});
          } else if (nex_one_cnt == 0) {
            add(my_answer, v, query{offset, 13});
            add(my_answer, v, query{offset + 1, 11});
          }
          offset += 3;
        } else if (pre == "101") {
          add(my_answer, v, query{offset, 5});
        } else if (pre == "011") {
          add(my_answer, v, query{offset + 1, 3});
        }
      }
      offset += 3;
    }
    int num = 0;
    for (int i = 0; i < N - offset; ++i) {
      num += (1 << i) * v[offset + i];
    }
    assert(all_oks[N - offset][num]);
    vector<query> add_answer = all_anss[N - offset][num];
    for (auto& a_ans : add_answer) a_ans.l += offset;
    my_answer.insert(my_answer.end(), add_answer.begin(), add_answer.end());
    cout << "YES" << endl;
    say(my_answer);
  }
  return 0;
}