#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); int T; cin >> T; while (T--) { int n; string s; cin >> n >> s; int cnt_w = 0; rep(i, 0, n) cnt_w += s[i] == 'W'; if (cnt_w%2 == 0) printf("YES\n"); else printf("NO\n"); } }