#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N], ans[N], n, tot;
bool dfs(int x) {
  if (x > n - 2) return 0;
  if (a[x] + a[x + 1] + a[x + 2] == 2) {
    ans[++tot] = x;
    a[x] = a[x + 1] = a[x + 2] = a[x] ^ a[x + 1] ^ a[x + 2];
    return 1;
  }
  if (!a[x]) return 1;
  if (!a[x + 2]) {
    ans[++tot] = x;
    a[x] = a[x + 1] = a[x + 2] = a[x] ^ a[x + 1] ^ a[x + 2];
  }
  if (dfs(x + 2)) {
    ans[++tot] = x;
    a[x] = a[x + 1] = a[x + 2] = a[x] ^ a[x + 1] ^ a[x + 2];
    return 1;
  }
  return 0;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    int s = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      s += a[i];
    }
    if (s & 1) {
      cout << "NO" << endl;
      continue;
    }
    tot = 0;
    int flag = 1;
    for (int i = 1; i <= n - 2; i++) {
      if (!dfs(i)) {
        if (i == 1 || !dfs(i - 1)) {
          flag = 0;
          cout << "NO" << endl;
          goto aaa;
        }
      }
    }
    if (flag) {
      cout << "YES" << endl;
      cout << tot << endl;
      for (int i = 1; i <= tot; i++) cout << ans[i] << " ";
      if (tot) cout << endl;
    }
  aaa:;
  }
}
