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;
const int inf = 1e9 + 7;
const long long INF = 1e18L + 7;
template <class n, class second>
ostream &operator<<(ostream &p, pair<n, second> x) {
  return p << "<" << x.first << ", " << x.second << ">";
}
template <class n>
auto operator<<(ostream &p, n y) ->
    typename enable_if<!is_same<n, string>::value,
                       decltype(y.begin(), p)>::type {
  int o = 0;
  p << "{";
  for (auto c : y) {
    if (o++) p << ", ";
    p << c;
  }
  return p << "}";
}
void dor() { cerr << '\n'; }
template <class n, class... second>
void dor(n p, second... y) {
  cerr << p << " ";
  dor(y...);
}
template <class n, class second>
void mini(n &p, second y) {
  if (p > y) p = y;
}
template <class n, class second>
void maxi(n &p, second y) {
  if (p < y) p = y;
}
const int N = 1e5 + 7;
int n;
vector<vector<int> > ans;
int t[N];
void zle() {
  cout << "NO" << '\n';
  exit(0);
}
void ok() {
  cout << "YES" << '\n';
  cout << ans.size() << '\n';
  for (auto it : ans) {
    cout << it[0] << " " << it[1] << " " << it[2] << '\n';
  }
  exit(0);
}
void first(int a, int b, int c) {
  ans.push_back({a, b, c});
  t[a] ^= 1;
  t[b] ^= 1;
  t[c] ^= 1;
}
void g(int b, int c) {
  int r = c - b;
  int a = b - r;
  first(a, b, c);
}
vector<int> kraw;
int skad[1 << 18];
int dist[1 << 18];
queue<int> Q;
void brut(int b) {
  for (int i = 0; i < b; ++i) {
    for (int r = 1; i + 2 * r < b; ++r) {
      int m = 0;
      m |= 1 << i;
      m |= 1 << (i + r);
      m |= 1 << (i + 2 * r);
      kraw.push_back(m);
    }
  }
  int second = 0;
  for (int i = 0; i < b; ++i) {
    if (t[i + 1]) second |= 1 << i;
  }
  for (int i = 0; i < 1 << b; ++i) {
    dist[i] = inf;
  }
  dist[second] = 0;
  Q.push(second);
  while (!Q.empty()) {
    int v = Q.front();
    Q.pop();
    for (auto it : kraw) {
      if (dist[v ^ it] == inf) {
        dist[v ^ it] = dist[v] + 1;
        skad[v ^ it] = v;
        Q.emplace(v ^ it);
      }
    }
  }
  if (dist[0] == inf) zle();
  vector<int> path;
  int curr = 0;
  while (curr != second) {
    path.emplace_back(curr ^ skad[curr]);
    curr = skad[curr];
  }
  reverse((path).begin(), (path).end());
  for (auto it : path) {
    vector<int> foo;
    for (int i = 0; i < b; ++i) {
      if (it & (1 << i)) foo.push_back(i + 1);
    }
    first(foo[0], foo[1], foo[2]);
  }
  ok();
}
void solve(int b) {
  if (b <= 13) {
    brut(b);
    return;
  }
  int sum = 0;
  for (int i = b - 2; i <= b; ++i) {
    sum += t[i];
  }
  if (sum == 3) {
    first(b - 2, b - 1, b);
    solve(b - 3);
  } else if (sum == 0)
    solve(b - 3);
  else if (sum == 1) {
    for (int i = b - 2; i <= b; ++i) {
      if (t[i]) {
        first(i - 6, i - 3, i);
        break;
      }
    }
    solve(b - 3);
  } else {
    if (!t[b]) {
      g(b - 2, b - 1);
      solve(b - 3);
    } else if (!t[b - 1]) {
      g(b - 2, b);
      solve(b - 3);
    } else {
      vector<int> zap;
      for (int i = b - 5; i <= b - 3; ++i) {
        if (t[i]) zap.push_back(i);
      }
      if (zap.empty()) {
        g(b - 5, b - 1);
        g(b - 5, b);
      } else if (zap.size() == 3) {
        g(b - 3, b - 1);
        g(b - 4, b);
      } else if (zap.size() == 2) {
        g(zap.back(), b);
        g(zap[zap.size() - 2], b - 1);
      } else {
        if (zap[0] == b - 5) {
          first(b - 5, b - 3, b - 1);
          first(b - 6, b - 3, b);
        } else if (zap[0] == b - 4) {
          first(b - 2, b - 1, b);
          first(b - 6, b - 4, b - 2);
        } else if (zap[0] == b - 3) {
          first(b - 6, b - 3, b);
          g(b - 6, b - 1);
        }
      }
      solve(b - 6);
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> t[i];
  }
  solve(n);
  for (int i = 1; i <= n; ++i) {
    assert(t[i]);
  }
}