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 IT>
ostream &print(IT b, IT e, string sep = " ", ostream &stream = cout) {
  for (IT it = b; it != e; ++it) {
    stream << *it;
    if (it + 1 != e) stream << sep;
  }
  return stream;
}
template <typename IT>
istream &read(IT b, IT e, istream &stream = cin) {
  for (IT it = b; it != e; ++it) stream >> *it;
  return stream;
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &&t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
istream &operator>>(istream &stream, vector<T> &t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename F, typename S>
ostream &operator<<(ostream &stream, const pair<F, S> t) {
  return stream << t.first << ' ' << t.second;
}
template <typename F, typename S>
istream &operator>>(istream &stream, pair<F, S> &t) {
  return stream >> t.first >> t.second;
}
template <typename T>
void print(T x, string end = "\n") {
  cout << x << end;
}
template <typename t>
void print(vector<t> arr, string sep = " ") {
  if (arr.empty()) {
    return;
  }
  print(arr.begin(), arr.end(), sep);
  cout << '\n';
}
template <typename T>
void print(vector<vector<T> > arr) {
  for (int i = 0; i < int(arr.size()); ++i) {
    cout << "[" << arr[i] << "]";
    if (i + 1 < int(arr.size())) cout << ", ";
  }
  cout << '\n';
}
template <typename T>
T _();
const long long MOD = 1e9 + 7;
template <typename T>
vector<T> operator+(const vector<T> &lhs, const vector<T> &rhs) {
  vector<T> ans(lhs);
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] += rhs[i];
  return ans;
}
template <typename T>
vector<T> operator+=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs + rhs;
}
template <typename T>
vector<T> operator-(const vector<T> lhs, const vector<T> rhs) {
  vector<T> ans((lhs).begin(), (lhs).end());
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] -= rhs[i];
  return ans;
}
template <typename T>
vector<T> operator-=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs - rhs;
}
template <typename T>
vector<T> append(vector<T> &lhs, const vector<T> rhs) {
  lhs.insert(lhs.end(), (rhs).begin(), (rhs).end());
  return lhs;
}
template <typename T>
T max(const vector<T> arr) {
  assert(!arr.empty());
  T ans = arr[0];
  for (auto &cur : arr) ans = max(ans, cur);
  return ans;
}
template <typename T>
T max(const set<T> s) {
  assert(!s.empty());
  return *--s.end();
}
template <typename T, typename G>
vector<T> set_max(vector<T> &base, const vector<G> &comp) {
  assert(base.size() == comp.size());
  for (int i = 0; i < (int)comp.size(); ++i) base[i] = max(base[i], comp[i]);
  return base;
}
int orig_size = 0;
string s;
void no() {
  cout << "NO\n";
  exit(0);
}
int n;
vector<pair<int, int> > ans;
void make(int p, int k) {
  s.resize(max(int(s.size()), p));
  n = s.size();
  s[p - 1] ^= 1;
  s[p - k - 2] ^= 1;
  s[p - 2 * k - 3] ^= 1;
  ans.push_back({p, k});
}
void yes() {
  cout << "YES\n";
  cout << int(ans.size()) << '\n';
  assert((orig_size / 3) + 12 >= int(ans.size()));
  for (auto cur : ans)
    cout << cur.first - 2 * cur.second - 2 << ' ' << cur.first - cur.second - 1
         << ' ' << cur.first << '\n';
  exit(0);
}
void clean() {
  while (!s.empty() && s.back() == 0) {
    s.pop_back();
    n = s.size();
  }
}
void pprint() {
  string tmp = s;
  for (char &c : tmp) c += '0';
  print(tmp);
}
bool match(string t) {
  if (int(t.size()) > n) return false;
  reverse((t).begin(), (t).end());
  assert(int(s.size()) == n);
  for (int i = 0; i < int(t.size()); ++i)
    if (s[n - 1 - i] != t[i] - '0') return false;
  return true;
}
void _() {
  cin >> n;
  orig_size = n;
  s.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  for (int i = 0; i < n; ++i) s[i] -= '0';
  clean();
  while (int(s.size()) >= 11) {
    clean();
    if (match("111"))
      make(n, 0);
    else if (match("101"))
      make(n, 1);
    else if (match("001"))
      make(n, 2);
    else if (match("000011")) {
      make(n, 3);
      make(n - 1, 2);
    } else if (match("001011")) {
      make(n - 1, 1);
      make(n, 4);
    } else if (match("010011")) {
      make(n, 0);
      make(n - 2, 1);
    } else if (match("011011")) {
      make(n, 2);
      make(n - 1, 2);
    } else if (match("100011")) {
      make(n, 0);
      make(n - 2, 2);
    } else if (match("101011")) {
      make(n, 2);
      make(n - 1, 3);
    } else if (match("110011")) {
      make(n, 3);
      make(n - 1, 3);
    } else if (match("111011")) {
      make(n, 3);
      make(n - 1, 1);
    } else
      assert(false);
    clean();
  }
  clean();
  while (int(s.size()) >= 3) {
    clean();
    make(n, 0);
    clean();
  }
  clean();
  if (int(s.size()) == 0) yes();
  if (((match("1") && !match("01")) || match("11")) && orig_size >= 7) {
    make(7, 2);
    make(7, 0);
    make(6, 0);
    clean();
  }
  if (match("01") && orig_size >= 8) {
    make(8, 2);
    make(8, 0);
    make(7, 0);
    clean();
  }
  clean();
  if (int(s.size()) == 0) yes();
  no();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  _();
}