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>
using V = vector<T>;
template <typename T, typename U>
using P = pair<T, U>;
template <typename T>
T gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (a < b) swap(a, b);
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <typename T>
T lcm(T a, T b) {
  return (1LL * a * b) / gcd(a, b);
}
int inv(int a) { return a ? 0 : 1; }
int lim[8] = {0, 0, 1, 2, 4, 6, 9, 12};
int pt[12] = {0b00000111, 0b00001110, 0b00011100, 0b00010101,
              0b00111000, 0b00101010, 0b01110000, 0b01010100,
              0b01001001, 0b11100000, 0b10101000, 0b10010010};
vector<int> mask(1 << 12, 0);
vector<tuple<int, int, int>> ops;
map<int, vector<int>> ops2;
int n;
bool solve(vector<int> &a, int k) {
  if (k <= 8) {
    int t = 0;
    for (int i = 0; i < k; ++i)
      if (a[i]) t += (1 << i);
    bool ans = false;
    int res;
    for (int i = (0); i < (1 << lim[min(7, n - 1)]); ++i) {
      if ((t ^ mask[i]) == 0) {
        ans = true;
        for (int j = 0; j < lim[min(7, n - 1)]; ++j) {
          if (i & (1 << j)) {
            vector<int> temp;
            for (int b = 0; b < 8; ++b)
              if (pt[j] & (1 << b)) temp.push_back(b);
            ops.push_back(make_tuple(temp[0], temp[1], temp[2]));
          }
        }
        break;
      }
    }
    return ans;
  } else if (k <= 10) {
    if (a[k - 1] == 1 && a[k - 2] == 0) {
      a[k - 1] = 0;
      a[k - 3] = inv(a[k - 3]);
      a[k - 5] = inv(a[k - 5]);
      ops.push_back(make_tuple(k - 5, k - 3, k - 1));
    } else if (a[k - 1] == 0 && a[k - 2] == 1) {
      a[k - 2] = 0;
      a[k - 3] = inv(a[k - 3]);
      a[k - 4] = inv(a[k - 4]);
      ops.push_back(make_tuple(k - 4, k - 3, k - 2));
    } else if (a[k - 1] == 1 && a[k - 2] == 1) {
      a[k - 1] = 0;
      a[k - 2] = 0;
      a[k - 3] = inv(a[k - 3]);
      ops.push_back(make_tuple(k - 3, k - 2, k - 1));
    }
    return solve(a, k - 2);
  } else {
    int t = 0;
    for (int i = 0; i < 6; ++i)
      if (a[k - 1 - i]) t += (1 << i);
    vector<int> p = ops2[t];
    for (int i = (0); i < (p.size() / 3); ++i) {
      for (int j = (0); j < (3); ++j)
        a[k - p[i * 3 + j]] = inv(a[k - p[i * 3 + j]]);
      ops.push_back(
          make_tuple(k - p[i * 3], k - p[i * 3 + 1], k - p[i * 3 + 2]));
    }
    return solve(a, k - 6);
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  for (int i = 0; i < (1 << 12); ++i) {
    for (int j = 0; j < 12; ++j)
      if (i & (1 << j)) mask[i] ^= pt[j];
  }
  ops2[0b000000] = {};
  ops2[0b000001] = {1, 6, 11, 6, 7, 8};
  ops2[0b000010] = {2, 6, 10, 6, 7, 8};
  ops2[0b000100] = {3, 7, 11};
  ops2[0b001000] = {4, 7, 10};
  ops2[0b010000] = {5, 7, 9};
  ops2[0b100000] = {6, 7, 8};
  ops2[0b000011] = {1, 2, 3, 3, 7, 11};
  ops2[0b000101] = {1, 3, 5, 5, 7, 9};
  ops2[0b001001] = {1, 4, 7};
  ops2[0b010001] = {1, 5, 9};
  ops2[0b100001] = {1, 6, 11};
  ops2[0b000110] = {2, 3, 4, 4, 7, 10};
  ops2[0b001010] = {2, 4, 6, 6, 7, 8};
  ops2[0b010010] = {2, 5, 8};
  ops2[0b100010] = {2, 6, 10};
  ops2[0b001100] = {3, 4, 5, 5, 7, 9};
  ops2[0b010100] = {3, 5, 7};
  ops2[0b100100] = {3, 6, 9};
  ops2[0b011000] = {4, 5, 6, 6, 7, 8};
  ops2[0b101000] = {4, 6, 8};
  ops2[0b110000] = {5, 6, 7};
  ops2[0b000111] = {1, 2, 3};
  ops2[0b001011] = {2, 4, 6, 1, 6, 11};
  ops2[0b010011] = {1, 2, 3, 3, 5, 7};
  ops2[0b100011] = {1, 2, 3, 3, 6, 9};
  ops2[0b001101] = {1, 4, 7, 3, 7, 11};
  ops2[0b010101] = {1, 3, 5};
  ops2[0b100101] = {1, 3, 5, 5, 6, 7};
  ops2[0b011001] = {1, 4, 7, 5, 7, 9};
  ops2[0b101001] = {1, 4, 7, 6, 7, 8};
  ops2[0b110001] = {1, 5, 9, 6, 7, 8};
  ops2[0b001110] = {2, 3, 4};
  ops2[0b010110] = {2, 5, 8, 3, 7, 11};
  ops2[0b100110] = {2, 6, 10, 3, 7, 11};
  ops2[0b011010] = {2, 5, 8, 4, 7, 10};
  ops2[0b101010] = {2, 4, 6};
  ops2[0b110010] = {2, 5, 8, 6, 7, 8};
  ops2[0b011100] = {3, 4, 5};
  ops2[0b101100] = {3, 4, 5, 5, 6, 7};
  ops2[0b110100] = {3, 5, 7, 6, 7, 8};
  ops2[0b111000] = {4, 5, 6};
  ops2[0b001111] = {1, 2, 3, 4, 7, 10};
  ops2[0b010111] = {1, 2, 3, 5, 7, 9};
  ops2[0b100111] = {1, 2, 3, 6, 7, 8};
  ops2[0b011011] = {1, 4, 7, 2, 5, 8};
  ops2[0b101011] = {1, 4, 7, 2, 6, 10};
  ops2[0b110011] = {1, 5, 9, 2, 6, 10};
  ops2[0b011101] = {1, 3, 5, 4, 7, 10};
  ops2[0b101101] = {1, 4, 7, 3, 6, 9};
  ops2[0b110101] = {1, 3, 5, 6, 7, 8};
  ops2[0b111001] = {1, 4, 7, 5, 6, 7};
  ops2[0b011110] = {2, 3, 4, 5, 7, 9};
  ops2[0b101110] = {2, 3, 4, 6, 7, 8};
  ops2[0b110110] = {2, 5, 8, 3, 6, 9};
  ops2[0b111010] = {2, 4, 6, 5, 7, 9};
  ops2[0b111100] = {3, 4, 5, 6, 7, 8};
  ops2[0b011111] = {1, 5, 9, 2, 3, 4};
  ops2[0b101111] = {1, 2, 3, 4, 6, 8};
  ops2[0b110111] = {1, 2, 3, 5, 6, 7};
  ops2[0b111011] = {2, 4, 6, 1, 5, 9};
  ops2[0b111101] = {1, 3, 5, 4, 6, 8};
  ops2[0b111110] = {2, 3, 4, 5, 6, 7};
  ops2[0b111111] = {1, 2, 3, 4, 5, 6};
  bool ans = solve(a, n);
  cout << (ans ? "YES" : "NO") << endl;
  if (ans) {
    cout << ops.size() << endl;
    for (auto v : ops) {
      cout << get<0>(v) + 1 << " " << get<1>(v) + 1 << " " << get<2>(v) + 1
           << endl;
    }
  }
  return 0;
}