Even before they leave the apartment, Joey drives Chandler crazy by forgetting everything useful, even his passport, but crying every five seconds "London, baby!", and photographing absolutely everything all the time, as if 6 hours on an airplane with Monica weren't bad enough. On reaching, Joey uses a map to visit the famous places nearby.

Joey is currently at the coordinates (0,0) and he wants to reach the coordinates (P,Q). Chandler has a set of instructions for Joey to move. He provides Joey a binary string S of length N. Joey chooses one of the axes : either x-axis or y-axis. Joey then follows the instructions. To follow the i^{th} instruction:

If S_{i} = 0, Joey has to change his axis immediately and move in any direction (positive or negative) of the resulting axis by 1 unit. 

If S_{i} = 1, Joey can move in any direction (positive or negative) along the current axis by 1 unit.

For x-axis, moving in positive direction implies moving from (x, y) to (x+1, y) and moving in negative direction implies moving from (x,y) to (x-1, y). Similarly, for y-axis, moving in positive direction implies moving from (x, y) to (x, y+1) and moving in negative direction implies moving from (x,y) to (x, y-1).

Determine if Joey can reach (P,Q) at the end.

------ Input Format ------ 

- First line will contain T, number of testcases. Then the testcases follow.
- First line of each testcase contains of three integers N, P, Q.
- Second line of each test case contains a binary string S.

------ Output Format ------ 

For each test case print "YES" if he can reach coordinates (P, Q) at the end, else print "NO".

You may print each character of each string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).

------ Constraints ------ 

$1 ≤ T ≤ 10^{4}$
$1 ≤ N ≤ 10^{5}$
$-10^{6} ≤ P, Q ≤ 10^{6}$
$S$ contains $0, 1$ only.
- Sum of $N$ over all test cases does not exceed $2 \cdot 10^{5}$

----- Sample Input 1 ------ 
3
3 0 -1
111
4 2 0
1101
2 0 1
00
----- Sample Output 1 ------ 
YES
YES
NO
----- explanation 1 ------ 
Test case 1: Joey starts by choosing the y-axis. $S_{0} = 1$, he chooses to move towards the positive direction of y-axis. $S_{1} = 1$, he chooses to move towards the negative direction of y-axis. $S_{2} = 1$, he moves towards the negative direction of y-axis. Thus, his path is $(0, 0)$ $\rightarrow$ $(0, 1)$ $\rightarrow$ $(0, 0)$ $\rightarrow$ $(0, -1)$.

Test case 2: Joey starts by choosing x-axis. $S_{0} = 1$, he chooses to move towards the positive direction of x-axis. $S_{1} = 1$, he chooses to moves towards the positive direction of x-axis. $S_{2} = 0$, he changes the axis and chooses to move towards the negative direction of y-axis $S_{3} = 0$, he changes the axis and chooses to move towards the positive direction of y-axis. Thus, his path is $(0, 0)$ $\rightarrow$ $(1, 0)$ $\rightarrow$ $(2, 0)$ $\rightarrow$ $(2, -1)$ $\rightarrow$ $(2, 0)$.

Difficulty: MEDIUM_HARD

Solutions:
def switch(d):
	if d == 'a':
		return 'b'
	elif d == 'b':
		return 'a'
t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = str(input())
	d = 'a'
	dist = {'a': 0, 'b': 0}
	for i in range(n):
		if s[i] == '0':
			d = switch(d)
			dist[d] += 1
		elif s[i] == '1':
			dist[d] += 1
	a = dist['a']
	b = dist['b']
	if abs(p) <= a and (a - abs(p)) % 2 == 0 and (abs(q) <= b) and ((b - abs(q)) % 2 == 0) or (abs(p) <= b and (b - abs(p)) % 2 == 0 and (abs(q) <= a) and ((a - abs(q)) % 2 == 0)):
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	(p, q) = (abs(p), abs(q))
	s = input().strip()
	x = [0, 0]
	for i in s:
		if i == '0':
			x = x[::-1]
		x[1] += 1
	if x[0] >= p and x[1] >= q and ((x[0] - p) % 2 == 0) and ((x[1] - q) % 2 == 0) or (x[1] >= p and x[0] >= q and ((x[1] - p) % 2 == 0) and ((x[0] - q) % 2 == 0)):
		print('YES')
	else:
		print('NO')


def solve(n, p, q, s, a):
	l = [0, 0]
	for i in range(n):
		if s[i] == '0':
			a = a ^ 1
			l[a] += 1
		else:
			l[a] += 1
	p = abs(p)
	q = abs(q)
	if p <= l[0] and q <= l[1]:
		r1 = l[0] - p
		r2 = l[1] - q
		if r1 % 2 == 0 and r2 % 2 == 0:
			return True
		else:
			return False
	else:
		return False
t = int(input())
for i in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	a1 = solve(n, p, q, s, 0)
	a2 = solve(n, p, q, s, 1)
	print('YES' if a1 or a2 else 'NO')


def solve(n, p, q, s, axes):
	arr = [0, 0]
	for i in range(n):
		if s[i] == '0':
			axes = axes ^ 1
			arr[axes] += 1
		else:
			arr[axes] += 1
	p = abs(p)
	q = abs(q)
	if p <= arr[0] and q <= arr[1]:
		rem_x = arr[0] - p
		rem_y = arr[1] - q
		if rem_x % 2 == 0 and rem_y % 2 == 0:
			return True
		else:
			return False
	else:
		return False
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	a1 = solve(n, p, q, s, 0)
	a2 = solve(n, p, q, s, 1)
	if a1 or a2:
		print('YES')
	else:
		print('NO')


n = int(input())

def ans(s, z1):
	arr = []
	c = 0
	for i in s:
		if i == '0':
			if c:
				arr.append(c)
			c = 1
		else:
			c += 1
	if c:
		arr.append(c)
	(x, y, z) = (0, 0, 1)
	for i in arr:
		if z:
			x += i
			z = 0
		else:
			y += i
			z = 1
	(p, q) = (z1[1], z1[2])
	if p >= -x and p <= x and ((p - x) % 2 == 0) and (q >= -y) and (q <= y) and ((q - y) % 2 == 0):
		print('YES')
		return
	if p >= -y and p <= y and ((p - y) % 2 == 0) and (q >= -x) and (q <= x) and ((q - x) % 2 == 0):
		print('YES')
		return
	print('NO')
	return
for i in range(0, n):
	z = [int(i) for i in input().split()]
	s = input()
	ans(s, z)


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	p = abs(p)
	q = abs(q)
	s = input()
	arr = [0] * 2
	curr = 0
	for x in s:
		if x == '0':
			curr = 1 - curr
		arr[curr] += 1
	flag = 0
	if arr[0] >= p and arr[1] >= q:
		if abs(p - arr[0]) % 2 == 0 and abs(q - arr[1]) % 2 == 0:
			flag = 1
	if arr[0] >= q and arr[1] >= p:
		if abs(p - arr[1]) % 2 == 0 and abs(q - arr[0]) % 2 == 0:
			flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


def Convert(string):
	list1 = []
	list1[:0] = string
	return list1
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	a = input()
	a1 = Convert(a)
	op1 = op2 = cnt = 0
	lst = []
	for i in a1:
		if i != '0':
			cnt += 1
		else:
			lst.append(cnt)
			cnt = 1
	lst.append(cnt)
	for i in range(len(lst)):
		if i % 2 == 0:
			op1 += lst[i]
		else:
			op2 += lst[i]
	lst1 = list(range(-op1, op1 + 1, 2))
	lst2 = list(range(-op2, op2 + 1, 2))
	if p in lst1 and q in lst2:
		print('YES')
	elif q in lst1 and p in lst2:
		print('YES')
	else:
		print('NO')


def getDestCoord(start, dest, axis, inst):
	if i == '0':
		axis[0] ^= 1
	start[axis[0]] += 1 if start[axis[0]] < dest[axis[0]] else -1
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	inst = input()
	dest = [p, q]
	(start_x, start_y) = ([0, 0], [0, 0])
	(axis_x, axis_y) = ([0], [1])
	for i in inst:
		getDestCoord(start_x, dest, axis_x, i)
		getDestCoord(start_y, dest, axis_y, i)
	print('YES') if start_x == dest or start_y == dest else print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split(' '))
	s = input()
	(p, q) = (abs(p), abs(q))
	(a, b) = (0, 0)
	d = {0: 0, 1: 0}
	curr = 0
	for i in range(n):
		if s[i] == '1':
			d[curr] += 1
		else:
			curr = abs(curr - 1)
			d[curr] += 1
	(a, b) = (d[0], d[1])
	(t1, q1) = (a - p, b - q)
	c1 = (t1 >= 0 and t1 % 2 == 0) and (q1 >= 0 and q1 % 2 == 0)
	(t2, q2) = (a - q, b - p)
	c2 = (t2 >= 0 and t2 % 2 == 0) and (q2 >= 0 and q2 % 2 == 0)
	if c1 or c2:
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline

def check(f, s):
	x = 0
	y = 0
	for v in s:
		if v == '0':
			f = not f
		if f:
			if x > p:
				x -= 1
			else:
				x += 1
		elif y > q:
			y -= 1
		else:
			y += 1
	return x == p and y == q
t = int(input())
for _ in range(t):
	(n, p, q) = [int(x) for x in input().split()]
	s = input().rstrip()
	if check(False, s) or check(True, s):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	p = abs(p)
	q = abs(q)
	(x, y) = (0, 0)
	r = 'X'
	for j in range(n):
		if s[j] == '0':
			if r == 'X':
				r = 'Y'
				y += 1
			else:
				r = 'X'
				x += 1
		elif r == 'X':
			x += 1
		else:
			y += 1
	flag = 0
	if x >= p and y >= q:
		if abs(p - x) % 2 == 0 and abs(q - y) % 2 == 0:
			flag = 1
	if x >= q and y >= p:
		if abs(p - y) % 2 == 0 and abs(q - x) % 2 == 0:
			flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	(x1, x2, y1, y2) = (0, 0, 0, 0)
	(p, q) = (abs(p), abs(q))
	(x, y) = (True, True)
	(x1, x2, y1, y2) = (0, 0, 0, 0)
	for i in s:
		if i == '0':
			x = not x
			y = not y
		if x:
			x1 += 1
		else:
			y1 += 1
		if y:
			y2 += 1
		else:
			x2 += 1
	if x1 >= p and y1 >= q and ((x1 - p) % 2 == 0) and ((y1 - q) % 2 == 0) or (x2 >= p and y2 >= q and ((x2 - p) % 2 == 0) and ((y2 - q) % 2 == 0)):
		print('YES')
	else:
		print('NO')


nums = int(input())
for i in range(nums):
	arr = [int(i) for i in input().split()]
	x = abs(arr[1])
	y = abs(arr[2])
	track = input()
	tracklst = [i for i in str(track)]
	curr = 0
	currx = 0
	curry = 0
	for i in tracklst:
		i = int(i)
		if i == 1:
			if curr == 0:
				currx += 1
			else:
				curry += 1
		elif curr == 0:
			curry += 1
			curr = 1
		else:
			currx += 1
			curr = 0
	if currx >= x and (currx - x) % 2 == 0 and (curry >= y) and ((curry - y) % 2 == 0):
		print('YES')
	elif curry >= x and (curry - x) % 2 == 0 and (currx >= y) and ((currx - y) % 2 == 0):
		print('YES')
	else:
		print('NO')


def test(p, q):
	(a, b) = (p, q)
	(x, y) = (0, 0)
	for j in s:
		if j == '0':
			(x, y) = (y, x)
			(a, b) = (b, a)
			if x < a:
				x += 1
			else:
				x -= 1
		elif x < a:
			x += 1
		else:
			x -= 1
	return (x, y) == (p, q) or (y, x) == (p, q)
for i in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = str(input())
	if test(p, q) or test(q, p):
		print('YES')
	else:
		print('NO')


def calculate(p, q, flag_a, flag_b):
	if flag_a >= abs(p) and abs(flag_a - p) % 2 == 0:
		if flag_b >= abs(q) and abs(flag_b - q) % 2 == 0:
			return True
	return False

def _func(n, p, q, a):
	flag_a = 0
	flag_b = 0
	change = False
	for _a in a:
		if _a == '0':
			change = not change
		if change != True:
			flag_a += 1
		else:
			flag_b += 1
	if calculate(p, q, flag_a, flag_b):
		return 'YES'
	elif calculate(p, q, flag_b, flag_a):
		return 'YES'
	else:
		return 'NO'

def main():
	t = int(input())
	for _ in range(t):
		(n, p, q) = map(int, input().split())
		a = input()
		print(_func(n, p, q, a))
main()


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	b = 0
	x = 0
	y = 0
	for i in s:
		if i == '1' and b == 0:
			x += 1
		elif i == '1' and b == 1:
			y += 1
		elif i == '0' and b == 0:
			y += 1
			b = 1
		elif i == '0' and b == 1:
			x += 1
			b = 0
	if x >= abs(p) and (x - abs(p)) % 2 == 0 and (y >= abs(q)) and ((y - abs(q)) % 2 == 0) or (y >= abs(p) and (y - abs(p)) % 2 == 0 and (x >= abs(q)) and ((x - abs(q)) % 2 == 0)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	c = max(abs(p), abs(q))
	d = min(abs(p), abs(q))
	b = 0
	x = 0
	y = 0
	for i in s:
		if i == '1' and b == 0:
			x += 1
		elif i == '1' and b == 1:
			y += 1
		elif i == '0' and b == 0:
			y += 1
			b = 1
		elif i == '0' and b == 1:
			x += 1
			b = 0
	e = max(x, y)
	f = min(x, y)
	if d > f or c > e:
		print('NO')
	elif d == f and c == e:
		print('YES')
	elif d == f and c < e:
		if (e - c) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif d < f and c == e:
		if (f - d) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif d < f and c < e and (c > f):
		if (f - d) % 2 == 0 and (e - c) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif d < f and c < e and (c < f):
		if (f - d) % 2 == 0 and (e - c) % 2 == 0 or ((e - d) % 2 == 0 and (f - c) % 2 == 0):
			print('YES')
		else:
			print('NO')
	elif c == f:
		if (e - d) % 2 == 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	x = 0
	cx = 0
	cy = 0
	for j in s:
		if j == '1':
			if x % 2 == 0:
				cx += 1
			else:
				cy += 1
		elif x % 2 == 0:
			x += 1
			cy += 1
		else:
			x += 1
			cx += 1
	if (abs(p) <= cx and (cx - abs(p)) % 2 == 0) and (abs(q) <= cy and (cy - abs(q)) % 2 == 0):
		print('YES')
	else:
		y = 0
		cx = 0
		cy = 0
		for j in s:
			if j == '1':
				if y % 2 == 0:
					cy += 1
				else:
					cx += 1
			elif y % 2 == 0:
				y += 1
				cx += 1
			else:
				y += 1
				cy += 1
		if (abs(p) <= cx and (cx - abs(p)) % 2 == 0) and (abs(q) <= cy and (cy - abs(q)) % 2 == 0):
			print('YES')
		else:
			print('NO')


from typing import DefaultDict
from math import sqrt
import math

def calculate(p, q):
	mod = 998244353
	expo = 0
	expo = mod - 2
	while expo:
		if expo & 1:
			p = p * q % mod
		q = q * q % mod
		expo >>= 1
	return p

def prime(n):
	prime_flag = 0
	if n > 1:
		for i in range(2, int(sqrt(n)) + 1):
			if n % i == 0:
				prime_flag = 1
				break
		if prime_flag == 0:
			return True
		else:
			return False
	else:
		return True

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n
for _ in range(int(input())):
	bool = True
	flag = True
	ans = 1
	(n, p, q) = map(int, input().split())
	s = input()
	x = 0
	y = 0
	for ele in s:
		if ele == '1':
			if bool:
				x += 1
			else:
				y += 1
		else:
			bool = not bool
			if flag:
				y += 1
			else:
				x += 1
			flag = not flag
	if abs(p) <= x and abs(p) % 2 == x % 2 and (abs(q) <= y) and (abs(q) % 2 == y % 2):
		print('YES')
	elif abs(p) <= y and abs(p) % 2 == y % 2 and (abs(q) <= x) and (abs(q) % 2 == x % 2):
		print('YES')
	else:
		print('NO')


tc = int(input())

def walk(commands, axis):
	(x, y) = (0, 0)
	current = axis
	for i in bin:
		if i == 1 and current == 'x':
			x += 1
		elif i == 1 and current == 'y':
			y += 1
		elif i == 0 and current == 'x':
			y += 1
			current = 'y'
		elif i == 0 and current == 'y':
			x += 1
			current = 'x'
	return (x, y)

def check(x, y, p, q):
	flag = False
	if x >= p and y >= q:
		(xsteps, ysteps) = (p - x, q - y)
		if xsteps % 2 == 0 and ysteps % 2 == 0:
			flag = True
		else:
			flag = False
	else:
		flag = False
	return flag
while tc > 0:
	tc -= 1
	(n, p, q) = map(int, input().split())
	binary = input()
	bin = []
	for i in range(n):
		bin.append(int(binary[i]))
	(x, y) = walk(bin, 'x')
	flag = check(x, y, abs(p), abs(q))
	flag2 = check(y, x, abs(p), abs(q))
	if flag or flag2:
		print('YES')
	else:
		print('NO')


def helper(s):
	x = 0
	y = 0
	for c in s:
		if c == '1':
			x += 1
		else:
			(x, y) = (y, x)
			x += 1
	return (x, y)
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	(p, q) = (abs(p), abs(q))
	(a, b) = helper(s)
	if a >= p and b >= q and (abs(a - p) % 2 == 0 and abs(b - q) % 2 == 0):
		print('YES')
	elif b >= p and a >= q and (abs(b - p) % 2 == 0 and abs(a - q) % 2 == 0):
		print('YES')
	else:
		print('NO')


import sys
import pprint
import logging
from logging import getLogger
import array
import collections
import io
import os
import heapq
import bisect
inf = float('inf')

def solve():
	for _ in range(*linp()):
		(n, p, q) = map(lambda x: abs(int(x)), input().split())
		s = input()
		ok = False
		for curr in range(2):
			x = y = 0
			for i in s:
				if i == '1':
					if curr == 0:
						x += 1
					else:
						y += 1
				else:
					curr ^= 1
					if curr == 0:
						x += 1
					else:
						y += 1
			if x >= p and y >= q and ((x - p) % 2 == 0) and ((y - q) % 2 == 0):
				ok = True
		print('YES' if ok else 'NO')

def linp():
	return [int(i) for i in input().split()]
logging.basicConfig(format='%(message)s', level=logging.WARNING)
logger = getLogger(__name__)
logger.setLevel(logging.INFO)

def debug(msg, *args):
	logger.info(f'{msg}={pprint.pformat(args)}')
solve()


for i in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	p = abs(p)
	q = abs(q)
	x = 0
	y = 0
	count = 0
	for i in range(n):
		if s[i] == '1' and count == 0:
			x += 1
		elif s[i] == '1' and count == 1:
			y += 1
		elif s[i] == '0' and count == 0:
			y += 1
			count = 1
		elif s[i] == '0' and count == 1:
			x += 1
			count = 0
	count0 = 0
	if abs(p) % 2 == 0 and abs(q) % 2 == 0 and (x % 2 == 0) and (y % 2 == 0):
		if x >= p and y >= q:
			count0 += 1
	if abs(p) % 2 != 0 and abs(q) % 2 == 0 and (x % 2 != 0) and (y % 2 == 0):
		if x >= p and y >= q:
			count0 += 1
	if abs(q) % 2 != 0 and abs(p) % 2 == 0 and (x % 2 == 0) and (y % 2 != 0):
		if x >= p and y >= q:
			count0 += 1
	if abs(q) % 2 != 0 and abs(p) % 2 != 0 and (x % 2 != 0) and (y % 2 != 0):
		if x >= p and y >= q:
			count0 += 1
	if abs(q) % 2 == 0 and abs(p) % 2 == 0 and (x % 2 == 0) and (y % 2 == 0):
		if x >= q and y >= p:
			count0 += 1
	if abs(q) % 2 != 0 and abs(p) % 2 == 0 and (x % 2 != 0) and (y % 2 == 0):
		if x >= q and y >= p:
			count0 += 1
	if abs(p) % 2 != 0 and abs(q) % 2 == 0 and (x % 2 == 0) and (y % 2 != 0):
		if x >= q and y >= p:
			count0 += 1
	if abs(p) % 2 != 0 and abs(q) % 2 != 0 and (x % 2 != 0) and (y % 2 != 0):
		if x >= q and y >= p:
			count0 += 1
	if count0 > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t = t - 1
	(n, k, z) = map(int, input().split())
	k = abs(k)
	z = abs(z)
	s = input()
	ls = list(s)
	l = 'NO'
	for dir in range(0, 2):
		p = k
		q = z
		for i in ls:
			if int(i) == 0:
				if dir == 1:
					if q > 0:
						q = q - 1
					else:
						q = q + 1
					dir = 0
				else:
					dir = 1
					if p > 0:
						p = p - 1
					else:
						p = p + 1
			elif dir == 1:
				if p > 0:
					p = p - 1
				else:
					p = p + 1
			elif q > 0:
				q = q - 1
			else:
				q = q + 1
		if p == 0 and q == 0:
			l = 'YES'
			break
		else:
			l = 'NO'
	print(l)


n = int(input())
i = 0
while i < n:
	i = i + 1
	(x, u, v) = map(int, input().split())
	a = input()
	t = a + '-'
	g = []
	s = 0
	p = 0
	while p <= len(a):
		if t[p] == '1':
			s = s + 1
		if t[p] == '0':
			g.append(s)
			s = 1
		if t[p] == '-':
			g.append(s)
		p = p + 1
	s1 = 0
	s2 = 0
	e = 0
	while e < len(g):
		if e % 2 == 0:
			s1 = s1 + g[e]
		else:
			s2 = s2 + g[e]
		e = e + 1
	r = []
	t1 = -s1
	t2 = -s2
	while s1 >= t1:
		r.append(s1)
		s1 = s1 - 2
	k = []
	while s2 >= t2:
		k.append(s2)
		s2 = s2 - 2
	if u in k and v in r:
		print('YES')
	elif v in k and u in r:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, x, y) = map(int, input().split())
	l = input()
	a = 0
	f = 0
	b = 0
	for i in range(n):
		if f == 0:
			if l[i] == '0':
				b += 1
				f = 1
			else:
				a += 1
		elif l[i] == '0':
			a += 1
			f = 0
		else:
			b += 1
	x = abs(x)
	y = abs(y)
	if a >= x and b >= y and (a % 2 == x % 2) and (b % 2 == y % 2):
		print('YES')
	elif a >= y and b >= x and (a % 2 == y % 2) and (b % 2 == x % 2):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	bi = list(input())
	curr = 0
	arr = [0] * 2
	for x in bi:
		if x == '0':
			curr = 1 - curr
		arr[curr] += 1
	p = abs(p)
	q = abs(q)
	if arr[0] >= p and arr[1] >= q and ((arr[0] - p) % 2 == 0) and ((arr[1] - q) % 2 == 0):
		print('YES')
	elif arr[0] >= q and arr[1] >= p and ((arr[1] - p) % 2 == 0) and ((arr[0] - q) % 2 == 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = list(map(int, input().split()))
	s = input()
	possible = False
	for j in range(2):
		axis = j
		x = y = 0
		for i in s:
			if i == '0':
				axis ^= 1
			if axis == 0:
				if x < p:
					x = x + 1
				else:
					x = x - 1
			elif y < q:
				y = y + 1
			else:
				y = y - 1
		if (x, y) == (p, q):
			possible = True
	if possible == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, x, y) = map(int, input().split())
	s = input()
	p = 0
	q = 0
	xx = 1
	for i in range(n):
		if xx:
			if s[i] == '1':
				p = p + 1
			else:
				q = q + 1
				xx = 0
		elif s[i] == '1':
			q = q + 1
		else:
			p = p + 1
			xx = 1
	if ((p + x) / 2).is_integer() and ((p - x) / 2).is_integer() and ((q + y) / 2).is_integer() and ((q - y) / 2).is_integer() and ((p + x) / 2 >= 0) and ((p - x) / 2 >= 0) and ((q + y) / 2 >= 0) and ((q - y) / 2 >= 0):
		print('YES')
	elif ((q + x) / 2).is_integer() and ((q - x) / 2).is_integer() and ((p + y) / 2).is_integer() and ((p - y) / 2).is_integer() and ((q + x) / 2 >= 0) and ((q - x) / 2 >= 0) and ((p + y) / 2 >= 0) and ((p - y) / 2 >= 0):
		print('YES')
	else:
		print('NO')


import sys
from itertools import islice
i = iter(sys.stdin)
next(i)
for (t, s) in zip(i, i):
	(n, p, q) = map(abs, map(int, t.split()))
	a = [0, 0]
	i = 0
	for x in islice(s, n):
		if x == '0':
			i ^= 1
		a[i] += 1
	r = all((p > l[0] or q > l[1] or (p ^ l[0] | q ^ l[1]) & 1 for l in (a, a[::-1])))
	print('YNEOS'[r::2])


def solve(p, q, n, s):
	p = abs(p)
	q = abs(q)
	arr = [0, 0]
	i = 0
	for char in s:
		if char == '0':
			i = i ^ 1
		arr[i] += 1
	if arr[0] >= p and arr[1] >= q:
		if (arr[0] - p) % 2 == 0 and (arr[1] - q) % 2 == 0:
			return 'YES'
	if arr[1] >= p and arr[0] >= q:
		if (arr[0] - q) % 2 == 0 and (arr[1] - p) % 2 == 0:
			return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	print(solve(p, q, n, s))


t = int(input())
for z in range(t):
	(n, p, q) = map(int, input().split())
	a = input()
	x1 = y1 = x2 = y2 = 0
	f1 = True
	f2 = True
	for i in range(n):
		if a[i] == '0':
			f1 = not f1
			f2 = not f2
		if f1:
			x1 += 1
		else:
			y1 += 1
		if f2:
			y2 += 1
		else:
			x2 += 1
	if x1 >= p >= -x1 and (p + x1) % 2 == 0 and (y1 >= q >= -y1) and ((q + y1) % 2 == 0):
		print('YES')
		continue
	if x2 >= p >= -x2 and (p + x2) % 2 == 0 and (y2 >= q >= -y2) and ((q + y2) % 2 == 0):
		print('YES')
		continue
	print('NO')


t = int(input())
for i in range(t):
	(n, p, q) = [int(i) for i in input().split()]
	s = input()
	evenone = oddone = 0
	even = True
	for i in s:
		if i == '0':
			if even:
				even = False
			else:
				even = True
		if even:
			evenone += 1
		else:
			oddone += 1
	p = abs(p)
	q = abs(q)
	if evenone - p >= 0 and oddone - q >= 0:
		if (evenone - p) % 2 == 0 and (oddone - q) % 2 == 0:
			print('YES')
			continue
	if evenone - q >= 0 and oddone - p >= 0:
		if (evenone - q) % 2 == 0 and (oddone - p) % 2 == 0:
			print('YES')
			continue
	print('NO')


def func(arr, P, Q):
	if arr[0] >= P and arr[1] >= Q:
		if (arr[0] - P) % 2 == 0 and (arr[1] - Q) % 2 == 0:
			return 'YES'
	if arr[1] >= P and arr[0] >= Q:
		if (arr[0] - Q) % 2 == 0 and (arr[1] - P) % 2 == 0:
			return 'YES'
	return 'NO'
for t in range(int(input())):
	(N, P, Q) = map(int, input().split())
	S = input()
	(P, Q) = (abs(P), abs(Q))
	arr = [0 for i in range(2)]
	idx = 0
	for i in S:
		if i == '0':
			idx ^= 1
		arr[idx] += 1
	print(func(arr, P, Q))


def helper(p, q, o, z):
	if p == o and q == z:
		return True
	d1 = o - p
	d2 = z - q
	if d1 < 0 or d2 < 0:
		return False
	if d1 % 2 == 0 and d2 % 2 == 0:
		return True
	else:
		return False
for _ in range(int(input())):
	x = list(map(int, input().strip().split()))
	n = x[0]
	p = abs(x[1])
	q = abs(x[2])
	s = input()
	(x, y, flag) = (0, 0, 1)
	for e in s:
		if e == '0':
			flag *= -1
		if flag == 1:
			x += 1
		else:
			y += 1
	if helper(p, q, x, y) or helper(q, p, x, y):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	val1 = 0
	val2 = 0
	present = 1
	for i in s:
		if i == '0':
			if present == 1:
				present = 2
				val2 += 1
			else:
				present = 1
				val1 += 1
		elif present == 1:
			val1 += 1
		else:
			val2 += 1
	p = abs(p)
	q = abs(q)
	ans = 0
	if val1 >= p:
		if val2 >= q:
			if (val1 - p) % 2 == 0 and (val2 - q) % 2 == 0:
				ans = 1
	if val2 >= p:
		if val1 >= q:
			if (val2 - p) % 2 == 0 and (val1 - q) % 2 == 0:
				ans = 1
	if ans == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	path = input()
	flg = True
	x = y = 0
	for b in path:
		if b == '0':
			flg = not flg
		if flg:
			x += 1
		else:
			y += 1
	(m, n) = (abs(p), abs(q))
	if min(x, y) >= max(m, n):
		(max_p, min_p) = (max(x, y), min(x, y))
		if (max_p - m) % 2 != 0 and (min_p - m) % 2 != 0 or ((max_p - n) % 2 != 0 and (min_p - n) % 2 != 0):
			print('NO')
		elif (max_p - m) % 2 != 0 and (max_p - n) % 2 != 0 or ((min_p - m) % 2 != 0 and (min_p - n) % 2 != 0):
			print('NO')
		else:
			print('YES')
	elif min(x, y) < min(m, n) or max(x, y) < max(m, n):
		print('NO')
	else:
		(max_p, min_p) = (max(x, y), min(x, y))
		(max_dist, min_dist) = (max(m, n), min(m, n))
		if (max_p - max_dist) % 2 != 0 or (min_p - min_dist) % 2 != 0:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	p = abs(p)
	q = abs(q)
	s2 = ''
	x = 0
	y = 0
	a = 0
	for j in s:
		if j == '1':
			if a & 1 == 0:
				x += 1
				s2 += 'x'
			else:
				y += 1
				s2 += 'y'
		else:
			a += 1
			if a & 1 == 0:
				x += 1
				s2 += 'x'
			else:
				y += 1
				s2 += 'y'
	if x >= p and y >= q and (x - p & 1 == 0) and (y - q & 1 == 0) or (x >= q and y >= p and (x - q & 1 == 0) and (y - p & 1 == 0)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	a = 0
	b = 0
	temp = 1
	for i in range(n):
		if s[i] == '0':
			if temp == 1:
				temp = 0
			else:
				temp = 1
		if temp == 1:
			a += 1
		else:
			b += 1
	p = abs(p)
	q = abs(q)
	if min([a, b]) >= max([p, q]):
		maxp = max([a, b])
		minp = min([a, b])
		if (maxp - p) % 2 != 0 and (minp - p) % 2 != 0 or ((maxp - q) % 2 != 0 and (minp - q) % 2 != 0):
			print('NO')
		elif (maxp - p) % 2 != 0 and (maxp - q) % 2 != 0 or ((minp - p) % 2 != 0 and (minp - q) % 2 != 0):
			print('NO')
		else:
			print('YES')
	elif min([a, b]) < min([p, q]) or max([a, b]) < max([p, q]):
		print('NO')
	else:
		maxp = max([a, b])
		minp = min([a, b])
		maxd = max([p, q])
		mind = min([p, q])
		if (maxp - maxd) % 2 != 0 or (minp - mind) % 2 != 0:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	(n, x, y) = [int(i) for i in input().split()]
	f = False
	s = input()
	c = [0, 0]
	j = 0
	for i in s:
		if i == '1':
			c[j] += 1
		elif i == '0':
			if j == 0:
				j = 1
			else:
				j = 0
			c[j] += 1
	if (c[0] - x >= 0 and (c[0] - x) % 2 == 0) and (c[1] - y >= 0 and (c[1] - y) % 2 == 0) and (c[0] + x >= 0 and (c[0] + x) % 2 == 0) and (c[1] + y >= 0 and (c[1] + y) % 2 == 0):
		f = True
	if (c[1] - x >= 0 and (c[1] - x) % 2 == 0) and (c[0] - y >= 0 and (c[0] - y) % 2 == 0) and (c[1] + x >= 0 and (c[1] + x) % 2 == 0) and (c[0] + y >= 0 and (c[0] + y) % 2 == 0):
		f = True
	if f:
		print('YES')
	else:
		print('NO')


for u in range(int(input())):
	(n, x, y) = map(int, input().split())
	s = list(input())
	(x, y) = (abs(x), abs(y))
	(a, b) = (0, 0)
	f = 0
	for i in range(n):
		if s[i] == '0':
			f = 1 - f
		if f == 0:
			a += 1
		else:
			b += 1
	if a >= x and b >= y and (abs(a - x) % 2 == 0 and abs(b - y) % 2 == 0):
		print('YES')
	elif b >= x and a >= y and (abs(b - x) % 2 == 0 and abs(a - y) % 2 == 0):
		print('YES')
	else:
		print('NO')


try:
	for _ in range(int(input())):
		(n, p, q) = map(int, input().split())
		s = list(input())
		check = 0
		for i in range(1, n):
			if s[i - 1] == '0':
				if s[i] == '0':
					s[i] = '1'
				else:
					s[i] = '0'
		c1 = s.count('0')
		c2 = s.count('1')
		if (c1 >= abs(p) and c1 % 2 == abs(p) % 2) and (c2 >= abs(q) and c2 % 2 == abs(q) % 2):
			print('YES')
		elif (c1 >= abs(q) and c1 % 2 == abs(q) % 2) and (c2 >= abs(p) and c2 % 2 == abs(p) % 2):
			print('YES')
		else:
			print('NO')
except:
	pass


for _ in range(int(input())):
	(n, p, q) = list(map(int, input().split()))
	arr = list(map(int, input()))
	(a, b) = (0, 0)
	flag = 1
	for i in arr:
		if i == 0:
			if flag == 0:
				flag = 1
			else:
				flag = 0
		if flag == 1:
			a += 1
		else:
			b += 1
	p = abs(p)
	q = abs(q)
	if min(a, b) >= max(p, q):
		maxp = max(a, b)
		minp = min(a, b)
		if (maxp - p) % 2 != 0 and (minp - p) % 2 != 0 or ((maxp - q) % 2 != 0 and (minp - q) % 2 != 0):
			print('NO')
		elif (maxp - p) % 2 != 0 and (maxp - q) % 2 != 0 or ((minp - p) % 2 != 0 and (minp - q) % 2 != 0):
			print('NO')
		else:
			print('YES')
	elif min(a, b) < min(p, q) or max(a, b) < max(p, q):
		print('NO')
	else:
		maxp = max(a, b)
		minp = min(a, b)
		maxd = max(p, q)
		mind = min(p, q)
		if (maxp - maxd) % 2 != 0 or (minp - mind) % 2 != 0:
			print('NO')
		else:
			print('YES')


from math import ceil, log2, floor, sqrt, gcd
from collections import defaultdict, deque
from bisect import bisect_left
import sys
import os.path
sys.setrecursionlimit(200000)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r+')
	sys.stdout = open('output.txt', 'w')

def MI():
	return map(int, input().split())
mod = 10 ** 9 + 7

def solve(testcase):
	(n, p, q) = MI()
	s = input()
	p = abs(p)
	q = abs(q)
	x = 0
	y = 0
	cur = 'x'
	for i in range(n):
		if s[i] == '0':
			if cur == 'x':
				cur = 'y'
				y += 1
			else:
				x += 1
				cur = 'x'
		elif cur == 'x':
			x += 1
		else:
			y += 1
	if x >= p and y >= q and ((x - p) % 2 == 0) and ((y - q) % 2 == 0):
		print('YES')
		return
	x = 0
	y = 0
	cur = 'y'
	for i in range(n):
		if s[i] == '0':
			if cur == 'x':
				cur = 'y'
				y += 1
			else:
				x += 1
				cur = 'x'
		elif cur == 'x':
			x += 1
		else:
			y += 1
	if x >= p and y >= q and ((x - p) % 2 == 0) and ((y - q) % 2 == 0):
		print('YES')
		return
	print('NO')
t = int(input())
for _ in range(t):
	solve(_ + 1)


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	state = 1
	count1 = 0
	count2 = 0
	for i in range(n):
		if s[i] == '0':
			state *= -1
		if state == 1:
			count1 += 1
		elif state == -1:
			count2 += 1
	if -count1 <= p <= count1 and -count2 <= q <= count2 and ((p + count1) % 2 == 0) and ((q + count2) % 2 == 0) or (-count2 <= p <= count2 and -count1 <= q <= count1 and ((p + count2) % 2 == 0) and ((q + count1) % 2 == 0)):
		print('YES')
	else:
		print('NO')


try:
	for i in range(int(input())):
		(n, x, y) = list(map(int, input().split()))
		coor = [x, y]
		st = input()
		ans1 = [0, 0]
		presentsent = 0
		for j in st:
			if j == '0':
				presentsent = presentsent ^ 1
			if ans1[presentsent] < coor[presentsent]:
				ans1[presentsent] += 1
			else:
				ans1[presentsent] -= 1
		ans2 = [0, 0]
		presentsent = 1
		for j in st:
			if j == '0':
				presentsent = presentsent ^ 1
			if ans2[presentsent] < coor[presentsent]:
				ans2[presentsent] += 1
			else:
				ans2[presentsent] -= 1
		if coor == ans1 or coor == ans2:
			print('YES')
		else:
			print('NO')
except:
	pass


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	(p, q) = (abs(p), abs(q))
	one = 0
	zero = 0
	f1 = True
	f2 = False
	for i in range(n):
		if f1 and s[i] == '1':
			one += 1
		elif f2 and s[i] == '1':
			zero += 1
		elif f1:
			f1 = False
			f2 = True
			zero += 1
		else:
			f2 = False
			f1 = True
			one += 1
	if one >= p and p & 1 == one & 1 and (zero >= q) and (zero & 1 == q & 1):
		print('YES')
	elif zero >= p and p & 1 == zero & 1 and (one >= q) and (one & 1 == q & 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().strip().split(' '))
	s = list(map(int, list(str(input()))))
	(x, y) = (0, 0)
	flag = 'x'
	for i in range(n):
		if flag == 'x':
			if s[i] == 1:
				if x <= p:
					x += 1
				else:
					x -= 1
			else:
				flag = 'y'
				if y <= q:
					y += 1
				else:
					y -= 1
		elif s[i] == 1:
			if y <= q:
				y += 1
			else:
				y -= 1
		else:
			flag = 'x'
			if x <= p:
				x += 1
			else:
				x -= 1
	if x == p and y == q:
		print('YES')
	else:
		(x, y) = (0, 0)
		flag = 'y'
		for i in range(n):
			if flag == 'x':
				if s[i] == 1:
					if x <= p:
						x += 1
					else:
						x -= 1
				else:
					flag = 'y'
					if y <= q:
						y += 1
					else:
						y -= 1
			elif s[i] == 1:
				if y <= q:
					y += 1
				else:
					y -= 1
			else:
				flag = 'x'
				if x <= p:
					x += 1
				else:
					x -= 1
		if x == p and y == q:
			print('YES')
		else:
			print('NO')


t = int(input())
for tt in range(t):
	(n, p, q) = map(int, input().split())
	a = input()
	pp = ''
	x = 0
	y = 0
	if p < 0:
		p *= -1
	if q < 0:
		q *= -1
	s = 0
	for r in a:
		if r == '1':
			if s & 1 == 0:
				x += 1
				pp += 'x'
			else:
				y += 1
				pp += 'y'
		else:
			s += 1
			if s & 1 == 0:
				x += 1
				pp += 'x'
			else:
				y += 1
				pp += 'y'
	if x >= p and y >= q and (x - p & 1 == 0) and (y - q & 1 == 0) or (x >= q and y >= p and (x - q & 1 == 0) and (y - p & 1 == 0)):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	x1 = 0
	y1 = 0
	x2 = 0
	y2 = 0
	axis1 = 'x'
	axis2 = 'y'
	for i in s:
		if i == '1':
			if axis1 == 'x':
				if x1 < p:
					x1 += 1
				else:
					x1 -= 1
			elif y1 < q:
				y1 += 1
			else:
				y1 -= 1
		elif axis1 == 'x':
			axis1 = 'y'
			if y1 < q:
				y1 += 1
			else:
				y1 -= 1
		else:
			axis1 = 'x'
			if x1 < p:
				x1 += 1
			else:
				x1 -= 1
	for i in s:
		if i == '1':
			if axis2 == 'x':
				if x2 < p:
					x2 += 1
				else:
					x2 -= 1
			elif y2 < q:
				y2 += 1
			else:
				y2 -= 1
		elif axis2 == 'x':
			axis2 = 'y'
			if y2 < q:
				y2 += 1
			else:
				y2 -= 1
		else:
			axis2 = 'x'
			if x2 < p:
				x2 += 1
			else:
				x2 -= 1
	if x1 == p and y1 == q or (x2 == p and y2 == q):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input()
	(x, y) = (0, 0)
	(x1, y1) = (0, 0)
	t = True
	for val in s:
		if val == '1':
			if t:
				if p >= x:
					x += 1
				else:
					x -= 1
				if q >= y1:
					y1 += 1
				else:
					y1 -= 1
			else:
				if p >= x1:
					x1 += 1
				else:
					x1 -= 1
				if q >= y:
					y += 1
				else:
					y -= 1
		else:
			if t:
				if p >= x1:
					x1 += 1
				else:
					x1 -= 1
				if q >= y:
					y += 1
				else:
					y -= 1
			else:
				if p >= x:
					x += 1
				else:
					x -= 1
				if q >= y1:
					y1 += 1
				else:
					y1 -= 1
			t ^= True
	if x == p and y == q or (x1 == p and y1 == q):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, p, q) = list(map(int, input().split()))
	s = input()
	a = [0, 0]
	cur = 0
	for i in s:
		if i == '1':
			a[cur] += 1
		else:
			cur = cur ^ 1
			a[cur] += 1
	p = abs(p)
	q = abs(q)
	if p < q:
		(p, q) = (q, p)
	d1 = max(a)
	d2 = min(a)
	if d1 >= p and d2 >= q:
		if (d1 - p) % 2 == 0 and (d2 - q) % 2 == 0:
			print('YES')
			continue
	if d2 >= p and d1 >= q:
		if (d2 - p) % 2 == 0 and (d1 - q) % 2 == 0:
			print('YES')
			continue
	print('NO')


def fn(cnt, p, q):
	if p <= cnt[0] and (cnt[0] - p) % 2 == 0 and (q <= cnt[1]) and ((cnt[1] - q) % 2 == 0):
		return 'YES'
	if q <= cnt[0] and (cnt[0] - q) % 2 == 0 and (p <= cnt[1]) and ((cnt[1] - p) % 2 == 0):
		return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	l = list(map(int, input().split(' ')))
	p = abs(l[1])
	q = abs(l[2])
	s = input()
	cnt = [0, 0]
	axis = 0
	for i in s:
		if i == '1':
			cnt[axis] += 1
		else:
			axis = 1 - axis
			cnt[axis] += 1
	res = fn(cnt, p, q)
	print(res)


t = int(input())
for _ in range(t):
	(n, p, q) = map(int, input().split())
	s = input()
	dir = [0, 0]
	x = 0
	for ele in s:
		if ele == '1':
			dir[x] += 1
		else:
			x = 1 - x
			dir[x] += 1
	(p, q) = (abs(p), abs(q))
	if dir[0] >= p and dir[1] >= q and (not (dir[0] + p) % 2) and (not (dir[1] + q) % 2):
		print('YES')
	elif dir[1] >= p and dir[0] >= q and (not (dir[1] + p) % 2) and (not (dir[0] + q) % 2):
		print('YES')
	else:
		print('NO')


try:
	for i in range(int(input())):
		(n, x, y) = list(map(int, input().split()))
		lis = [x, y]
		st = input()
		x1 = [0, 0]
		pre = 0
		for j in st:
			if j == '0':
				pre = pre ^ 1
			if x1[pre] < lis[pre]:
				x1[pre] += 1
			else:
				x1[pre] -= 1
		x2 = [0, 0]
		pre = 1
		for j in st:
			if j == '0':
				pre = pre ^ 1
			if x2[pre] < lis[pre]:
				x2[pre] += 1
			else:
				x2[pre] -= 1
		if lis == x1 or lis == x2:
			print('YES')
		else:
			print('NO')
except:
	pass


for _ in range(int(input())):
	(n, x, y) = map(int, input().split())
	s = input()
	c = [0, 0]
	i = 0
	x = abs(x)
	y = abs(y)
	for j in s:
		if j == '0':
			i = 1 - i
		c[i] += 1
	if c[0] >= x and c[1] >= y:
		r_x = c[0] - x
		r_y = c[1] - y
		if r_x % 2 == 0 and r_y % 2 == 0:
			print('YES')
			continue
	if c[0] >= y and c[1] >= x:
		r_x = c[1] - x
		r_y = c[0] - y
		if r_x % 2 == 0 and r_y % 2 == 0:
			print('YES')
			continue
	print('NO')


from collections import Counter
for _ in range(int(input())):
	(n, p, q) = map(int, input().split())
	s = input().strip()
	(a, b) = (0, 0)
	k = 1
	for i in range(n):
		if s[i] == '1':
			if k == 1:
				if p >= a:
					a += 1
				else:
					a -= 1
			elif q >= b:
				b += 1
			else:
				b -= 1
		elif k == 1:
			if q >= b:
				b += 1
			else:
				b -= 1
			k = 2
		else:
			k = 1
			if p >= a:
				a += 1
			else:
				a -= 1
	if [a, b] == [p, q]:
		print('YES')
	else:
		k = 2
		(a, b) = (0, 0)
		for i in range(n):
			if s[i] == '1':
				if k == 1:
					if p >= a:
						a += 1
					else:
						a -= 1
				elif q >= b:
					b += 1
				else:
					b -= 1
			elif k == 1:
				if q >= b:
					b += 1
				else:
					b -= 1
				k = 2
			else:
				k = 1
				if p >= a:
					a += 1
				else:
					a -= 1
		if [a, b] == [p, q]:
			print('YES')
		else:
			print('NO')


def Test(p, q, S):
	x = y = 0
	flag = 0
	for i in S:
		if i == '1':
			if flag == 0:
				x += 1
			else:
				y += 1
		else:
			if flag == 0:
				y += 1
			else:
				x += 1
			flag = flag ^ 1
	if (x >= p and (x - p) % 2 == 0) and (y >= q and (y - q) % 2 == 0):
		return 'YES'
	flag = 1
	x = y = 0
	for i in S:
		if i == '1':
			if flag == 0:
				x += 1
			else:
				y += 1
		else:
			if flag == 0:
				y += 1
			else:
				x += 1
			flag = flag ^ 1
	if (x >= p and (x - p) % 2 == 0) and (y >= q and (y - q) % 2 == 0):
		return 'YES'
	else:
		return 'NO'
try:
	t = int(input())
	for _ in range(t):
		(n, p, q) = map(int, input().split())
		S = input()
		print(Test(abs(p), abs(q), S))
except:
	pass


for _ in range(int(input())):
	(n, p, q) = map(int, input().split(' '))
	s = str(input())
	t = 0
	a = [1, 0]
	x = y = 0
	for i in range(n):
		if s[i] == '0':
			a[0] = (a[0] + 1) % 2
			a[1] = (a[1] + 1) % 2
		if x <= p:
			x += a[0]
		else:
			x -= a[0]
		if y <= q:
			y += a[1]
		else:
			y -= a[1]
	if x == p and y == q:
		t = 1
	a = [0, 1]
	x = y = 0
	for i in range(n):
		if s[i] == '0':
			a[0] = (a[0] + 1) % 2
			a[1] = (a[1] + 1) % 2
		if x <= p:
			x += a[0]
		else:
			x -= a[0]
		if y <= q:
			y += a[1]
		else:
			y -= a[1]
	if x == p and y == q:
		t = 1
	if t == 1:
		print('YES')
	else:
		print('NO')


def wedding(n, p, q, s):
	units = [0, 0]
	direction = 0
	for i in s:
		if i == '0':
			if direction == 0:
				direction = 1
			else:
				direction = 0
			units[direction] += 1
		else:
			units[direction] += 1
	if units[0] >= abs(p) and units[1] >= abs(q):
		extra_x = units[0] - abs(p)
		extra_y = units[1] - abs(q)
		if extra_x % 2 == 0 and extra_y % 2 == 0:
			return 'YES'
	if units[0] >= abs(q) and units[1] >= abs(p):
		extra_y = units[0] - abs(q)
		extra_x = units[1] - abs(p)
		if extra_x % 2 == 0 and extra_y % 2 == 0:
			return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	(N, P, Q) = map(int, input().split())
	S = input()
	print(wedding(N, P, Q, S))