#include <bits/stdc++.h>
using namespace std;
void testcase() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int x = 0;
  for (int i = 0; i < n; i++) {
    x = x ^ a[i];
  }
  if (x != 0) {
    cout << "NO" << '\n';
    return;
  }
  if (n % 2 == 1) {
    cout << "YES" << '\n';
    if (n == 3) {
      cout << "1" << '\n' << "1" << '\n';
      return;
    }
    cout << n - 2 << '\n';
    for (int i = 1; i <= n - 2; i += 2) {
      cout << i << " ";
    }
    for (int i = n - 4; i >= 1; i -= 2) {
      cout << i;
      if (i == 1) {
        cout << '\n';
      } else {
        cout << " ";
      }
    }
  } else {
    int y = a[0];
    int k = 1;
    while ((y != 0) && (k < n - 1)) {
      y = y ^ a[k];
      y = y ^ a[k + 1];
      k += 2;
    }
    if (y == 1) {
      cout << "NO" << '\n';
      return;
    } else {
      cout << "YES" << '\n';
      if (k == 1) {
        cout << n - 3 << '\n';
        if (n == 4) {
          cout << "2" << '\n';
          return;
        }
        for (int i = 2; i <= n - 2; i += 2) {
          cout << i << " ";
        }
        for (int i = n - 4; i >= 2; i -= 2) {
          cout << i;
          if (i == 2) {
            cout << '\n';
          } else {
            cout << " ";
          }
        }
      } else if (k == n - 1) {
        cout << n - 3 << '\n';
        if (n == 4) {
          cout << "1" << '\n';
          return;
        }
        for (int i = 1; i <= n - 3; i += 2) {
          cout << i << " ";
        }
        for (int i = n - 5; i >= 1; i -= 2) {
          cout << i;
          if (i == 1) {
            cout << '\n';
          } else {
            cout << " ";
          }
        }
      } else {
        cout << n - 4 << '\n';
        for (int i = 1; i <= k - 2; i += 2) {
          cout << i << " ";
        }
        for (int i = k - 4; i >= 1; i -= 2) {
          cout << i << " ";
        }
        if (n - k == 3) {
          cout << k + 1 << '\n';
          return;
        }
        for (int i = 1; i <= n - k - 2; i += 2) {
          cout << k + i << " ";
        }
        for (int i = n - k - 4; i >= 1; i -= 2) {
          cout << i + k;
          if (i == 1) {
            cout << '\n';
          } else {
            cout << " ";
          }
        }
      }
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    testcase();
  }
  return 0;
}
