#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int T; cin >> T; while(T--){ int N; cin >> N; N *= 2; map X,Y; while(N--){ int x,y; char c; cin >> x >> y >> c; if(c == 'x') Y[y]++; else X[x]++; } int x1 = 0,x2 = 0,y1 = 0,y2 = 0; for(auto [k,v] : X) x1 += v,x2 += v%2; for(auto [k,v] : Y) y1 += v,y2 += v%2; if(x2 < y2) swap(x2,y2),swap(x1,y1); if(x2%2 == y2%2 && x2 <= y1) cout << "Yes\n"; else cout << "No\n"; } }