#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#ifdef JASPER
#include "debug.h"
#else
#define debug(...) 166
#endif
const int N = 3e5 + 10;
ll v[N], c[N];
string solve() {
ll a, b, n;
string s;
cin >> n >> a >> b >> s;
ll on = 0, off = 0;
for (auto x : s) {
if (x == '0') off++; else
on++;
}
vector <bool> dp(101, 0);
dp[off] = 1;
queue <int> q;
q.push(off);
while (q.size()) {
int t = q.front();
q.pop();
for (int i = a; i <= b; i++) {
for (int j = 0; j <= i; j++) {
if (j <= t && i - j <= n - t) {
int nx = t - j + (i - j);
if (dp[nx])
continue;
dp[nx] = 1;
q.push(nx);
}
}
}
}
for (int i = a; i <= b; i++)
if (dp[i])
return "YES";
return "NO";
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
cin >> t;
while (t--) {
//solve();
cout << solve() << "\n";
}
}
I2luY2x1ZGUgImJpdHMvc3RkYysrLmgiCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnVzaW5nIGxsID0gbG9uZyBsb25nOwoKI2lmZGVmIEpBU1BFUgojaW5jbHVkZSAiZGVidWcuaCIKI2Vsc2UKI2RlZmluZSBkZWJ1ZyguLi4pIDE2NgojZW5kaWYKCmNvbnN0IGludCBOID0gM2U1ICsgMTA7CmxsIHZbTl0sIGNbTl07CgpzdHJpbmcgc29sdmUoKSB7CiAgICBsbCBhLCBiLCBuOwoKICAgIHN0cmluZyBzOwogICAgY2luID4+IG4gPj4gYSA+PiBiID4+IHM7CgogICAgbGwgb24gPSAwLCBvZmYgPSAwOwoKICAgIGZvciAoYXV0byB4IDogcykgewogICAgICAgIGlmICh4ID09ICcwJykgb2ZmKys7IGVsc2UgCiAgICAgICAgICAgIG9uKys7CiAgICB9CgogICAgdmVjdG9yIDxib29sPiBkcCgxMDEsIDApOwoKICAgIGRwW29mZl0gPSAxOwoKICAgIHF1ZXVlIDxpbnQ+IHE7CiAgICBxLnB1c2gob2ZmKTsKCiAgICB3aGlsZSAocS5zaXplKCkpIHsKICAgICAgICBpbnQgdCA9IHEuZnJvbnQoKTsKICAgICAgICBxLnBvcCgpOwogICAgICAgIGZvciAoaW50IGkgPSBhOyBpIDw9IGI7IGkrKykgewogICAgICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8PSBpOyBqKyspIHsKICAgICAgICAgICAgICAgIGlmIChqIDw9IHQgJiYgaSAtIGogPD0gbiAtIHQpIHsKICAgICAgICAgICAgICAgICAgICBpbnQgbnggPSB0IC0gaiArIChpIC0gaik7CiAgICAgICAgICAgICAgICAgICAgaWYgKGRwW254XSkKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICAgICAgZHBbbnhdID0gMTsKICAgICAgICAgICAgICAgICAgICBxLnB1c2gobngpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQoKICAgIGZvciAoaW50IGkgPSBhOyBpIDw9IGI7IGkrKykKICAgICAgICBpZiAoZHBbaV0pCiAgICAgICAgICAgIHJldHVybiAiWUVTIjsKCiAgICByZXR1cm4gIk5PIjsKfQoKc2lnbmVkIG1haW4oKXsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOyAKICAgIGNpbi50aWUoTlVMTCk7CiAgICBjb3V0LnRpZShOVUxMKTsKCiAgICBpbnQgdCA9IDE7CiAgICBjaW4gPj4gdDsKCgogICAgd2hpbGUgKHQtLSkgewogICAgICAgIC8vc29sdmUoKTsKICAgICAgICBjb3V0IDw8IHNvbHZlKCkgPDwgIlxuIjsKICAgIH0KfQo=