#include
using namespace std;
int calc(int i, int j, int d) { if ((i & 1) && (j & 1)) return d; else return calc((i + 1) » 1, (j + 1) » 1, d + 1); }
int main() { #ifdef LAEKOV_LOCAL freopen(".in", “r”, stdin); #endif
int t;
scanf("%d", &t);
while (t --) {
int n, s(0);
scanf("%d", &n);
for (int i = 0; i < n; i += 2) {
int a, b;
scanf("%d%d", &a, &b);
s ^= calc(a, b, 0);
}
puts(s ? "YES" : "NO");
}
}