You are given a multiset (i. e. a set that can contain multiple equal integers) containing $2n$ integers. Determine if you can split it into exactly $n$ pairs (i. e. each element should be in exactly one pair) so that the sum of the two elements in each pair is odd (i. e. when divided by $2$, the remainder is $1$).


-----Input-----

The input consists of multiple test cases. The first line contains an integer $t$ ($1\leq t\leq 100$) — the number of test cases. The description of the test cases follows.

The first line of each test case contains an integer $n$ ($1\leq n\leq 100$).

The second line of each test case contains $2n$ integers $a_1,a_2,\dots, a_{2n}$ ($0\leq a_i\leq 100$) — the numbers in the set.


-----Output-----

For each test case, print "Yes" if it can be split into exactly $n$ pairs so that the sum of the two elements in each pair is odd, and "No" otherwise. You can print each letter in any case.


-----Examples-----

Input
5
2
2 3 4 5
3
2 3 4 5 5 5
1
2 4
1
2 3
4
1 5 3 2 6 7 3 4
Output
Yes
No
No
Yes
No


-----Note-----

In the first test case, a possible way of splitting the set is $(2,3)$, $(4,5)$.

In the second, third and fifth test case, we can prove that there isn't any possible way.

In the fourth test case, a possible way of splitting the set is $(2,3)$.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
T = int(input())
for case in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	count_odd = 0
	count_even = 0
	for i in range(2 * n):
		if arr[i] % 2 == 0:
			count_even += 1
		else:
			count_odd += 1
	if count_odd == count_even:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))[:2 * n]
	c = 0
	for i in a:
		if i % 2 == 0:
			c += 1
	if c == n:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	cnt = 0
	for i in input().split():
		if int(i) % 2 == 1:
			cnt += 1
	if cnt == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for i in range(2 * n):
		if a[i] % 2 == 1:
			odd += 1
		else:
			even += 1
	ans = 'Yes' if odd == even else 'No'
	print(ans)


t = int(input())
for i in range(t):
	e = 0
	o = 0
	n = int(input())
	s = input()
	L = s.split()
	for j in L:
		if int(j) % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')


def solve(arr, num):
	even = 0
	odd = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == num and even == num:
		print('Yes')
	else:
		print('No')
num_iter = int(input())
while num_iter != 0:
	pr = int(input())
	lst = list(map(int, input().split()))
	solve(lst, pr)
	num_iter -= 1


test = int(input())
for i in range(test):
	c = int(input())
	list = input()
	list = list.split()
	t = 0
	for i in range(len(list)):
		if int(list[i]) % 2 != 0:
			t = t + 1
	if t == c:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	mas = [int(i) for i in input().split()]
	n0 = 0
	n1 = 0
	for a in mas:
		if a % 2 != 0:
			n1 += 1
		else:
			n0 += 1
	if n0 == n1:
		print('Yes')
	else:
		print('No')


def count(lst, odd):
	for i in lst:
		if i % 2 != 0:
			odd += 1
	return odd
for _ in range(int(input())):
	odd = 0
	(n, lst) = (int(input()), list(map(int, input().split())))
	odd = count(lst, odd)
	if n == 1:
		print('YES' if sum(lst) % 2 != 0 else 'NO')
	elif n == odd:
		print('YES')
	else:
		print('NO')


from collections import Counter
n = int(input())
for i in range(n):
	m = int(input())
	arr = list(map(int, input().split(' ')))
	k = len(arr)
	odd = 0
	even = 0
	for i in range(k):
		if arr[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	(e, o) = (0, 0)
	for j in l:
		if j % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o and o == n:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	a = s.split()
	cnt1 = 0
	cnt2 = 0
	for j in a:
		if int(j) % 2 == 1:
			cnt1 = cnt1 + 1
		else:
			cnt2 = cnt2 + 1
	if cnt1 == cnt2:
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		e = 0
		o = 0
		for i in range(2 * n):
			if a[i] % 2 == 0:
				e += 1
			else:
				o += 1
		if e == o:
			print('Yes')
		else:
			print('No')
main()


tes = int(input())
for _ in range(tes):
	n = input()
	lst = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for el in lst:
		if el & 1:
			odd += 1
		else:
			even += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum([x % 2 for x in a]) == n:
		print('Yes')
	else:
		print('No')


def solve(A):
	odd = sum([1 for it in A if it % 2])
	return 'Yes' if 2 * odd == len(A) else 'No'
for case in range(int(input())):
	n = int(input())
	print(solve(list(map(int, input().split()))))


import sys
import heapq
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	nums = list(map(int, sys.stdin.readline().split()))
	odd = 0
	for i in nums:
		if i % 2:
			odd += 1
	if odd == n:
		answer = 'YES'
	else:
		answer = 'NO'
	print(answer)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	count = 0
	count1 = 0
	for i in range(0, len(a)):
		if a[i] % 2 == 0:
			count += 1
		if a[i] % 2 != 0:
			count1 += 1
	if count == count1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	k = 0
	for num in a:
		if num % 2 == 0:
			k += 1
		else:
			k -= 1
	if k == 0:
		print('Yes')
	else:
		print('No')


kol = int(input())
for i in range(kol):
	n = int(input())
	mas = list(map(int, input().split()))
	even = [0] * 2
	for j in range(2 * n):
		even[mas[j] % 2] += 1
	if even[0] == even[1]:
		print('Yes')
	else:
		print('No')


t = int(input(''))
while t:
	t -= 1
	(c, nc) = (0, 0)
	n = int(input(''))
	dat = list(map(int, input('').split()))
	for i in dat:
		if i % 2 == 0:
			c += 1
		else:
			nc += 1
	print('Yes' if c == nc else 'No')


for x in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	(o, e) = (0, 0)
	for y in range(len(li)):
		if li[y] % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')


from os import path
from io import BytesIO, IOBase
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, Counter, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('0')
file = 1

def ceil(a, b):
	return (a + b - 1) // b

def solve():
	for _ in range(1, ii() + 1):
		n = ii()
		a = li()
		c1 = 0
		for i in a:
			if i & 1:
				c1 += 1
			else:
				c1 -= 1
		print('YES' if c1 == 0 else 'NO')
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


t = int(input())
for i in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	even = []
	odd = []
	for i in x:
		if i % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	if len(even) == len(odd):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	check = [0, 0]
	a = [int(x) for x in input().split()]
	for i in a:
		check[i % 2] += 1
	if check[0] == check[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(0, t):
	n = int(input())
	L = list(map(int, input().split()))
	count = 0
	for i in range(0, len(L)):
		if L[i] % 2 == 1:
			count += 1
	if count == n:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
n = int(input())
for i in range(n):
	m = int(input())
	lis = list(map(int, input().split()))
	ans_0 = 0
	ans_1 = 0
	for i in range(len(lis)):
		if lis[i] % 2 == 0:
			ans_0 += 1
		else:
			ans_1 += 1
	if ans_0 != ans_1:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(c) for c in input().split()]
	s1 = 0
	s2 = 0
	for i in range(2 * n):
		if a[i] % 2 == 0:
			s1 += 1
		else:
			s2 += 1
	if s1 == s2:
		print('YES')
	else:
		print('NO')


from sys import stdin
_input = stdin.readline
(_int, _range) = (int, range)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		arr = [_int(i) for i in _input().split()]
		even = 0
		for el in arr:
			if el % 2 == 0:
				even += 1
		odd = 2 * n - even
		if even == odd:
			print('YES')
		else:
			print('NO')
solution()


t = int(input())
for i in range(t):
	n = input()
	lst = input().split()
	odds = 0
	evens = 0
	for num in lst:
		if int(num) % 2:
			evens += 1
		else:
			odds += 1
	if evens == odds:
		print('Yes')
	else:
		print('No')


x = int(input())
while x:
	h = int(input())
	a = input().split()
	c = 0
	k = 0
	for b in a:
		if b != ' ':
			b = int(b)
			c += b % 2
	if c != h:
		print('No')
	else:
		print('Yes')
	x -= 1


t = int(input())
for i in range(t):
	n = int(input())
	s = input().split()
	knech = 0
	kch = 0
	j = 0
	while j != 2 * n:
		if int(s[j]) % 2 == 1:
			knech += 1
		elif int(s[j]) % 2 == 0:
			kch += 1
		j += 1
	if knech == kch:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	m = int(input())
	l = list(map(int, input().split()))
	even = 0
	odd = 0
	for k in range(m + m):
		if l[k] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print('Yes')
	else:
		print('No')


import sys, os
import math
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(MI())
		e = 0
		o = 0
		for i in a:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if e == o:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def MI():
	return map(int, input().split())

def outP(var):
	sys.stdout.write(str(var) + '\n')
MOD = 10 ** 9 + 7
mod = 998244353
main()


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	x = input().split()
	a = [int(i) for i in x]
	even = 0
	odd = 0
	for i in a:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ev = 0
	od = 0
	for i in arr:
		if i % 2 == 0:
			ev += 1
		else:
			od += 1
	if od == ev:
		print('Yes')
	else:
		print('No')


import math
debug = True

def pprint(*args, delimiter='#', amount=10):
	if debug:
		print('{0} DEBUG {0}'.format(delimiter * amount))
		print(*args)
		print('{0} ----- {0}'.format('-' * amount))

def solve():
	n = int(input())
	a = list(map(lambda x: int(x) % 2, input().split()))
	if a.count(1) == n:
		return 'Yes'
	return 'No'
t = int(input())
while t > 0:
	t -= 1
	print(solve())


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	k = 0
	z = 0
	for j in range(2 * n):
		if lst[j] % 2:
			z += 1
		else:
			k += 1
	if k == z:
		res = 'Yes'
	else:
		res = 'No'
	print(res)


for i in range(int(input())):
	N = int(input())
	Array = list(map(int, input().split()))
	Count = 0
	for i in Array:
		if i % 2 == 0:
			Count += 1
	if Count == N:
		print('Yes')
	else:
		print('No')


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	even = 0
	odd = 0
	for v in a:
		if v % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print('YES')
	else:
		print('NO')


t = int(input())
for cas in range(t):
	n = int(input())
	a = [int(e) for e in input().split()]
	m = len(list(filter(lambda x: x % 2, a)))
	if n == m:
		print('Yes')
	else:
		print('No')


t = int(input())
for inh in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	(e, o) = (0, 0)
	for i in range(0, 2 * n):
		if a[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('YES')
	else:
		print('NO')


n1 = int(input())
for i in range(n1):
	n = int(input())
	array = list(map(int, input().rstrip().split()))
	s = 0
	for item in array:
		if item % 2 == 0:
			s += 1
	if s == n:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	e = 0
	o = 0
	for i in li:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')


tt = int(input())
for i in range(tt):
	n = int(input())
	l = list(map(int, input().split()))
	cnt = 0
	for j in l:
		if j % 2 == 1:
			cnt += 1
	if n == cnt:
		print('Yes')
	else:
		print('No')


def solve():
	odd = 0
	even = 0
	for a in A:
		if a % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd != even:
		return 'NO'
	return 'YES'
test_cases = int(input())
for test_case in range(test_cases):
	N = int(input())
	A = list(map(int, input().split()))
	print(solve())


def solve():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = [int(i) for i in input().split()]
		(c1, c2) = (0, 0)
		for i in range(len(a)):
			if a[i] % 2 == 0:
				c1 += 1
			else:
				c2 += 1
		if c1 == c2:
			print('Yes')
		else:
			print('No')
solve()


import sys
import math
import random
from queue import PriorityQueue as PQ
from bisect import bisect_left as BSL
from bisect import bisect_right as BSR
from collections import OrderedDict as OD
from collections import Counter
from itertools import permutations
mod = 1000000007
sys.setrecursionlimit(1000000)
try:
	sys.stdin = open('actext.txt', 'r')
	OPENFILE = 1
except:
	pass

def get_ints():
	return map(int, input().split())

def palindrome(s):
	mid = len(s) // 2
	for i in range(mid):
		if s[i] != s[len(s) - i - 1]:
			return False
	return True

def check(i, n):
	if 0 <= i < n:
		return True
	else:
		return False
t = int(input())
for tt in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	counter = 0
	for i in arr:
		if i % 2 != 0:
			counter += 1
	if counter == n:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	p = int(input())
	list1 = list(map(int, input().split()))
	e = 0
	o = 0
	for j in list1:
		if j % 2:
			o += 1
		else:
			e += 1
	if e == o:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(number) for number in input().split(' ')]
	odd_cnt = 0
	event_cnt = 0
	for number in arr:
		if number % 2:
			odd_cnt += 1
		else:
			event_cnt += 1
	if odd_cnt == event_cnt:
		print('Yes')
	else:
		print('No')


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans.append(len([j for j in a if j % 2 == 1]) == n)
for r in ans:
	if r:
		print('Yes')
	else:
		print('No')


n = int(input())
while n > 0:
	s = int(input())
	lst = list(map(int, input().split()))
	count = 0
	for i in range(0, 2 * s):
		if lst[i] % 2 != 0:
			count += 1
	if count == s:
		print('Yes')
	else:
		print('No')
	n -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	odd = 0
	even = 0
	for ele in arr:
		if ele % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i & 1:
			c = c + 1
	if c != s:
		print('No')
	else:
		print('Yes')


import sys, os
from io import BytesIO, IOBase
mod = 10 ** 9 + 7
Mod = 998244353
INF = float('inf')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda : list(map(int, sys.stdin.readline().rstrip('\r\n').split()))
tc = 1
tc = int(input())
for test in range(1, tc + 1):
	n = int(input())
	a = inp()
	odd = 0
	for i in a:
		if i & 1:
			odd += 1
	if odd == n:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	x = []
	y = []
	for i in l:
		if i % 2 == 0:
			x.append(i)
		else:
			y.append(i)
	if len(x) == len(y):
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	liczby = list(map(int, input().split()))
	nieparzyste = 0
	for y in range(2 * n):
		if liczby[y] % 2 != 0:
			nieparzyste += 1
	if nieparzyste == n:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	o = 0
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')
	t -= 1


import os
import sys
from io import BytesIO, IOBase
from functools import lru_cache, reduce
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from bisect import bisect, bisect_left, bisect_right
import math
import threading
import time

def I():
	return input()

def get_int():
	return int(input())

def get_list():
	return list(map(int, input().split()))

def get_map():
	return map(int, input().split())

def get_list_str(li, s=' '):
	print(s.join(map(str, li)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def solve():
	n = get_int()
	ls = get_list()
	(c1, c2) = (0, 0)
	for val in ls:
		if val % 2 == 0:
			c1 += 1
		else:
			c2 += 1
	if c1 == c2:
		print('Yes')
	else:
		print('No')

def main():
	testcases = True
	if testcases:
		t = get_int()
		for _ in range(t):
			solve()
	else:
		solve()
main()


t = int(input())

def count_odd(ls: list):
	count = 0
	for item in ls:
		count += 1 if item % 2 == 1 else 0
	return count
for _ in range(t):
	n = int(input())
	mset = [int(i) for i in input().split()]
	num_odds = count_odd(mset)
	print('Yes' if num_odds == n else 'No')


t = int(input())
for i in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	bal = 0
	for num in nums:
		if num % 2 == 0:
			bal = bal + 1
		else:
			bal = bal - 1
	if bal != 0:
		print('No')
	else:
		print('Yes')


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_left, bisect_right
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	c = dict(Counter(l))
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieveForSmallestPrimeFactor():
	MAXN = 100001
	spf = [0 for i in range(MAXN)]
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, math.ceil(math.sqrt(MAXN))):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
	return spf

def getPrimeFactorizationLOGN(x):
	spf = sieveForSmallestPrimeFactor()
	ret = list()
	while x != 1:
		ret.append(spf[x])
		x = x // spf[x]
	return ret

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def si():
	return input()

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	n = ii()
	l = li()
	odd = 0
	for i in l:
		if i % 2 == 0:
			odd += 1
	if odd == n:
		print('YES')
	else:
		print('NO')
t = 1
t = ii()
for _ in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	(e, o) = (0, 0)
	for i in range(len(l)):
		if l[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	L = [int(i) for i in input().split()]
	even = 0
	odd = 0
	for i in range(0, len(L)):
		if L[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print(' Yes')
	else:
		print(' No')


t = int(input())
for i in range(t):
	n = int(input())
	odd = 0
	even = 0
	multiset = list(map(int, input().strip().split()))
	for number in multiset:
		if number % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	s = input().split()
	s = [int(j) for j in s]
	a = 0
	for j in s:
		if j % 2 == 0:
			a += 1
	if a == n:
		ans.append('Yes')
	else:
		ans.append('No')
for i in ans:
	print(i)


def func(n, vals):
	ec = 0
	oc = 0
	for i in vals:
		if i % 2 == 0:
			ec = ec + 1
		else:
			oc = oc + 1
	if ec == n and oc == n:
		return 'Yes'
	else:
		return 'No'
t = int(input(' '))
for t in range(0, t):
	n = int(input(' '))
	vals = list(map(int, input(' ').split()))
	res = func(n, vals)
	print(res)


def f(l):
	x = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			x = x + 1
	return x

def g(l, n):
	if f(l) == n:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(g(l, n))


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
threading.stack_size(10 ** 8)
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
sys.setrecursionlimit(300000)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=2 ** 51, func=lambda a, b: a & b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater

class TrieNode:

	def __init__(self):
		self.children = [None] * 26
		self.isEndOfWord = False

class Trie:

	def __init__(self):
		self.root = self.getNode()

	def getNode(self):
		return TrieNode()

	def _charToIndex(self, ch):
		return ord(ch) - ord('a')

	def insert(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				pCrawl.children[index] = self.getNode()
			pCrawl = pCrawl.children[index]
		pCrawl.isEndOfWord = True

	def search(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				return False
			pCrawl = pCrawl.children[index]
		return pCrawl != None and pCrawl.isEndOfWord

class Node:

	def __init__(self, data):
		self.data = data
		self.count = 0
		self.left = None
		self.right = None

class BinaryTrie:

	def __init__(self):
		self.root = Node(0)

	def insert(self, pre_xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = pre_xor & 1 << i
			if val:
				if not self.temp.right:
					self.temp.right = Node(0)
				self.temp = self.temp.right
				self.temp.count += 1
			if not val:
				if not self.temp.left:
					self.temp.left = Node(0)
				self.temp = self.temp.left
				self.temp.count += 1
		self.temp.data = pre_xor

	def query(self, xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = xor & 1 << i
			if not val:
				if self.temp.left and self.temp.left.count > 0:
					self.temp = self.temp.left
				elif self.temp.right:
					self.temp = self.temp.right
			elif self.temp.right and self.temp.right.count > 0:
				self.temp = self.temp.right
			elif self.temp.left:
				self.temp = self.temp.left
			self.temp.count -= 1
		return xor ^ self.temp.data
for ik in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ans = [0, 0]
	for i in range(2 * n):
		ans[l[i] % 2] += 1
	if ans[0] == ans[1] == n:
		print('Yes')
	else:
		print('No')


def main(lst, n):
	c = 0
	for i in lst:
		if i % 2:
			c += 1
	if c == n:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	print(main(lst, n))


t = int(input())
for i in range(0, t):
	n = int(input())
	nums = list(map(int, input().split()))
	odd = 0
	even = 0
	for x in nums:
		if x % 2:
			odd += 1
		else:
			even += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	co = 0
	ce = 0
	for j in l:
		if j % 2 == 0:
			ce = ce + 1
		else:
			co = co + 1
	if co == ce:
		print('Yes')
	else:
		print('No')


for s in [*open(0)][2::2]:
	print('YNeos'[sum((int(x) % 2 * 2 - 1 for x in s.split())) != 0::2])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	c = [0, 0]
	for no in a:
		c[no & 1] += 1
	if c[0] == c[1]:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	a = [int(_) for _ in input().split()]
	ile = 0
	for i in range(2 * n):
		ile = ile + 1 if a[i] % 2 == 0 else ile - 1
	print('YNeos'[ile != 0::2])


import sys
input = lambda : sys.stdin.readline()
int_arr = lambda : list(map(int, input().split()))
str_arr = lambda : list(map(str, input().split()))
get_str = lambda : map(str, input().split())
get_int = lambda : map(int, input().split())
get_flo = lambda : map(float, input().split())
mod = 1000000007

def solve(n, arr):
	o = 0
	for i in arr:
		if i % 2 != 0:
			o += 1
	if o % n == 0 and o // n % 2 != 0:
		print('Yes')
	else:
		print('No')
for _ in range(int(input())):
	n = int(input())
	arr = int_arr()
	solve(n, arr)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	oddsnum = sum([1 if t % 2 == 1 else 0 for t in a])
	if oddsnum != n:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in arr:
		if i & 1:
			odd += 1
		else:
			even += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	result = 0
	n = int(input())
	num_list = []
	num_list = map(int, input().split())
	for n in num_list:
		if n % 2 == 1:
			result += 1
		else:
			result -= 1
	if result == 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	d = dict()
	for i in a:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
		if d[i] > n:
			print('No')
			break
		if i % 2 != 0:
			odd += 1
	else:
		if odd == n:
			print('Yes')
		else:
			print('No')


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = Counter(arr)
	odd = 0
	even = 0
	flag = 0
	for (k, v) in d.items():
		if v > n:
			flag = 1
			break
		if k % 2:
			odd += v
		else:
			even += v
	if flag:
		print('Yes')
		continue
	if odd == even:
		print('Yes')
	else:
		print('No')


m = int(input())
for i in range(m):
	n = int(input())
	lis = list(map(int, input().split()))
	odd = 0
	even = 0
	for j in lis:
		if j % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	noe = 0
	noo = 0
	for j in l:
		if j % 2 == 0:
			noe = noe + 1
		else:
			noo = noo + 1
	if noe == noo:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	for j in range(2 * n):
		if a[j] % 2 == 1:
			odd += 1
	if odd == n:
		print('Yes')
	else:
		print('No')


t = int(input())
answers = []
for _ in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	odds = 0
	for i in range(2 * n):
		if ls[i] % 2 == 1:
			odds += 1
	if odds == n:
		answers.append('Yes')
	else:
		answers.append('NO')
for ans in answers:
	print(ans)


def is_splittable(a):
	count = sum([aa % 2 == 1 for aa in a])
	return count == len(a) // 2
n = int(input())
for t in range(n):
	n = int(input())
	a = list(map(int, input().split(' ')))
	assert len(a) == 2 * n
	result = is_splittable(a)
	print('Yes' if result else 'No')


t = int(input())
cnt1 = 0
cnt2 = 0
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	for j in l:
		if j % 2 == 0:
			cnt1 += 1
		else:
			cnt2 += 1
	if cnt1 == cnt2:
		print('Yes')
	else:
		print('No')
	cnt1 = 0
	cnt2 = 0


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split()))
	c = 0
	for i in range(len(a)):
		if a[i] % 2 != 0:
			c += 1
	if c == n:
		print('YES')
	else:
		print('NO')


t = int(input())
answers = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	for ai in a:
		if ai % 2 == 0:
			count += 1
		else:
			count -= 1
	if count == 0:
		answers.append('YES')
	else:
		answers.append('NO')
for answer in answers:
	print(answer)


from collections import defaultdict, deque
from bisect import bisect_left
import math, sys
input = sys.stdin.readline

def inp():
	l = list(map(int, input().split()))
	return l
for _ in range(int(input())):
	(n,) = inp()
	l = inp()
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o != n:
		print('No')
	else:
		print('Yes')


tt = int(input())
for _ in range(tt):
	n = int(input())
	nums = list(map(int, input().split()))
	ce = 0
	co = 0
	for i in nums:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	if co == ce:
		print('Yes')
	else:
		print('No')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
from bisect import bisect_left as lower_bound, bisect_right as upper_bound

def so():
	return int(input())

def st():
	return input()

def mj():
	return map(int, input().strip().split(' '))

def msj():
	return map(str, input().strip().split(' '))

def le():
	return list(map(int, input().split()))

def lebe():
	return list(map(int, input()))

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()

def joro(L):
	return ''.join(map(str, L))

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def tr(n):
	return n * (n + 1) // 2

def main():
	for i in range(so()):
		m = so()
		L = le()
		a = 0
		b = 0
		for i in range(m * 2):
			if L[i] % 2 != 0:
				b += 1
			else:
				a += 1
		if a != b:
			print('No')
		else:
			print('Yes')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


N = int(input())
t = lambda x: x % 2
for _ in range(N):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(map(t, l)) == n:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	o = 0
	s = list(map(int, input().split()))
	for i in s:
		if i % 2 == 1:
			o += 1
	if o == n:
		print('Yes')
	else:
		print('No')


t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odds = 0
	evens = 0
	for i in range(n * 2):
		if a[i] % 2 == 0:
			evens += 1
		else:
			odds += 1
	if evens == odds:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 == 0:
			c += 1
		else:
			c -= 1
	if c == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


def func():
	n = int(input())
	odd = 0
	even = 0
	nums = map(int, input().split())
	for num in nums:
		if num % 2:
			odd += 1
		else:
			even += 1
	print('yes') if odd == even else print('no')

def main():
	t = int(input())
	for _ in range(t):
		func()
main()


t = int(input())
for i in range(0, t):
	n = int(input())
	m = list(map(int, input().split()))
	o = 0
	e = 0
	for j in m:
		if j % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if o == e:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	co = 0
	for i in arr:
		if i % 2 != 0:
			co += 1
	if co == n:
		print('YES')
	else:
		print('NO')


testCases = int(input())
for i in range(testCases):
	n = int(input())
	odd = 0
	even = 0
	numberSet = list(input().split(' '))
	for j in numberSet:
		if int(j) % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		print('Yes')
	else:
		print('No')


t = int(input())
c1 = 0
c2 = 0
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(2 * n):
		if arr[i] % 2 == 0:
			c1 += 1
		elif arr[i] % 2 != 0:
			c2 += 1
	if c2 == n:
		print('Yes')
	else:
		print('No')
	c1 -= c1
	c2 -= c2


num_lines = int(input())

def solve(nums):
	count_ev = 0
	count_od = 0
	for num in nums:
		if num % 2 == 0:
			count_ev += 1
		else:
			count_od += 1
	if count_od == count_ev:
		return True
	else:
		return False
i = 0
while i < num_lines:
	n = int(input())
	nums = [int(x) for x in input().split()]
	if solve(nums):
		print('Yes')
	else:
		print('No')
	i += 1


t = int(input())
for i in range(0, t):
	n = int(input())
	a = [int(x) for x in input().split()]
	count = 0
	for i in a:
		if i % 2 == 1:
			count += 1
	if count == n:
		print('Yes')
	else:
		print('No')


for gg in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	count = 0
	for i in l:
		if i % 2 != 0:
			count += 1
	if count == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	ce = 0
	co = 0
	for i in a:
		if i % 2 == 0:
			ce = ce + 1
		if i % 2 == 1:
			co = co + 1
	if ce == co:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	odd = 0
	for i in arr:
		if i % 2 == 1:
			odd += 1
	if odd == n:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ec = 0
	for j in l:
		if j % 2 == 0:
			ec += 1
		else:
			pass
	if ec == n:
		print('yes')
	else:
		print('no')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sum_even = 0
	sum_odd = 0
	for aa in a:
		if aa % 2 == 0:
			sum_even += 1
		else:
			sum_odd += 1
	if sum_even == sum_odd:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	n_array = int(input())
	array = list(map(int, input().split()))
	if len([1 for elem in array if elem % 2 == 0]) == len([1 for elem in array if elem % 2 == 1]):
		print('Yes')
	else:
		print('No')


for test in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	count = 0
	for x in l:
		if x % 2 == 1:
			count += 1
	if count == n:
		print('yes')
	else:
		print('no')


tc = int(input())
for _ in range(tc):
	n = int(input())
	l = list(map(int, input().split()))
	c = [i % 2 for i in l]
	if sum(c) == n:
		print('Yes')
	else:
		print('No')


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	count = 0
	even = []
	odd = []
	for i in range(0, len(list1)):
		if list1[i] % 2 == 0:
			even.append(list1[i])
		else:
			odd.append(list1[i])
	if len(even) == len(odd):
		print('Yes')
	elif len(odd) > len(even):
		if len(even) == n:
			print('Yes')
		else:
			print('No')
	elif len(odd) == n:
		print('Yes')
	else:
		print('No')
	t = t - 1


t = int(input())
while t != 0:
	n = int(input())
	li1 = list(map(int, input().split()))
	cnt = 0
	cnt1 = 0
	for ele in li1:
		if ele % 2 == 0:
			cnt = cnt + 1
		else:
			cnt1 = cnt1 + 1
	if cnt == cnt1:
		print('Yes')
	else:
		print('No')
	t = t - 1


def f(a):
	c1 = 0
	c2 = 0
	for i in a:
		if i % 2 == 1:
			c2 += 1
		else:
			c1 += 1
	if c1 == c2:
		return 'Yes'
	else:
		return 'No'
t = int(input())
l = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = f(a)
	l.append(s)
for i in l:
	print(i)


for i in range(0, int(input())):
	e = 0
	a = int(input())
	b = list(map(int, input().split()))
	for j in b:
		if j % 2 == 0:
			e = e + 1
	if e == a:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = 0
	h = 0
	for i in range(0, len(l)):
		if l[i] % 2 == 1:
			h += 1
	print('Yes' if h == n else 'No')


t = int(input())
while t != 0:
	n = int(input())
	m = input()
	l = list(map(int, m.split()))
	even = 0
	odd = 0
	for i in l:
		if i % 2 == 0:
			even = even + 1
		else:
			odd += 1
	if even == odd:
		print('Yes')
	else:
		print('No')
	t = t - 1


import collections
t = int(input())
for tc in range(t):
	n = int(input())
	arr = collections.Counter(map(lambda x: int(x) % 2, input().split()))
	if arr[0] == arr[1]:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	n = 2 * int(input())
	conj = [int(k) for k in input().split()]
	odds = len(list(filter(lambda x: x % 2 == 1, conj)))
	if odds == n / 2:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	count = 0
	for i in c:
		if i % 2 == 0:
			count += 1
	if count == b:
		print('Yes')
	else:
		print('No')


t = int(input())

def check(nums):
	counter = 0
	for num in nums:
		if num % 2 == 0:
			counter += 1
		else:
			counter -= 1
	if counter == 0:
		return 'Yes'
	else:
		return 'No'
results = []
for i in range(t):
	n = int(input())
	nums = tuple(map(int, input().split(' ')))
	results.append(check(nums))
for result in results:
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	x = input()
	data = x.split()
	genap = 0
	ganjil = 0
	for j in range(len(data)):
		data[j] = int(data[j])
		if data[j] % 2 == 0:
			genap += 1
		else:
			ganjil += 1
	if genap == ganjil:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	e = 0
	o = 0
	for j in a:
		if j % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		print('Yes')
	else:
		print('No')


for _ in range(0, int(input())):
	nn = int(input())
	arr = list(map(int, input().split()))
	(eve, odd) = (0, 0)
	for i in arr:
		if i % 2 == 0:
			eve += 1
		else:
			odd += 1
	if odd == nn:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s1 = 0
	s2 = 0
	for i in l:
		if i % 2 == 0:
			s2 += 1
		else:
			s1 += 1
	if s1 == s2:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	chet = []
	nechet = []
	for j in a:
		if j % 2 == 0:
			chet.append(j)
		else:
			nechet.append(j)
	if len(chet) == len(nechet):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	odd = sum((li[i] % 2 != 0 for i in range(2 * n)))
	if odd == n:
		print('Yes')
	else:
		print('No')


from collections import defaultdict
import sys, io, os
INP = sys.stdin.readline
inp = lambda : [*map(int, INP().encode().split())]
sinp = lambda : [*map(str, INP().split())]
out = sys.stdout.write

def main():
	for _ in range(inp()[0]):
		n = inp()[0]
		d = defaultdict(int)
		l = inp()
		c = 0
		for i in range(2 * n):
			if l[i] % 2:
				c += 1
		if c == n:
			print('Yes')
		else:
			print('No')

def SumOfExpOfFactors(a):
	fac = 0
	lis = SortedList()
	if not a & 1:
		lis.add(2)
	while not a & 1:
		a >>= 1
		fac += 1
	for i in range(3, int(a ** 0.5) + 1, 2):
		if not a % i:
			lis.add(i)
		while not a % i:
			a //= i
			fac += 1
	if a != 1:
		lis.add(a)
		fac += 1
	return (fac, lis)
div = [0] * 1000001

def NumOfDivisors(n):
	for i in range(1, n + 1):
		for j in range(i, n + 1, i):
			div[j] += 1

def primes1(n):
	sieve = [True] * (n // 2)
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i // 2]:
			sieve[i * i // 2::i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [2 * i + 1 for i in range(1, n // 2) if sieve[i]]

def GCD(a, b):
	if b == 0:
		return a
	else:
		return GCD(b, a % b)

class Graph:

	def __init__(self):
		self.Graph = defaultdict(list)

	def addEdge(self, u, v):
		self.Graph[u].append(v)
		self.Graph[v].append(u)

	def DFSUtil(self, v, visited):
		visited.add(v)
		for neighbour in self.Graph[v]:
			if neighbour not in visited:
				self.DFSUtil(neighbour, visited)

	def DFS(self, v):
		visited = set()
		self.DFSUtil(v, visited)

	def BFS(self, s):
		visited = set()
		queue = []
		queue.append(s)
		visited.add(s)
		while queue:
			s = queue.pop(0)
			for i in self.Graph[s]:
				if i not in visited:
					queue.append(i)
					visited.add(i)

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
main()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	b = []
	c = []
	for i in l:
		if i % 2 == 0:
			b.append(i)
		else:
			c.append(i)
	if len(b) == len(c):
		print('yes')
	else:
		print('No')


a = int(input())
k = 0
m = 0
for i in range(a):
	b = int(input())
	c = input().split()
	for r in range(2 * b):
		if int(c[r]) % 2 == 0:
			k = k + 1
		else:
			m = m + 1
	if k == m:
		print('Yes')
	else:
		print('No')
	m = 0
	k = 0


for _ in range(int(input())):
	n = int(input())
	s = sum((x % 2 for x in map(int, input().split())))
	print('Yes' if s == n else 'No')


(a, d) = (int(input()), [])
for i in range(0, a):
	b = int(input())
	c = [int(i) % 2 for i in input().split(' ')]
	d.append('Yes' if c.count(0) == c.count(1) else 'No')
print(*d, sep='\n')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) % 2 for x in input().split()]
	if sum(a) == n:
		print('Yes')
	else:
		print('No')


t = int(input())
r = []
for i in range(t):
	n = int(input())
	x = input()
	x = x.split(' ')
	o = 0
	e = 0
	for i in x:
		if int(i) % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if e == o:
		r.append('Yes')
	else:
		r.append('No')
for i in r:
	print(i)


import sys

def main():
	N = int(input())
	for x in range(N):
		pairs = int(input())
		ms = list(map(int, input().split()))
		even_count = 0
		odd_count = 0
		for x in ms:
			if x % 2 == 0:
				even_count += 1
			else:
				odd_count += 1
		if odd_count == even_count:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	n = int(input())
	lis = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in lis:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd and even + odd == len(lis):
		print('Yes')
	else:
		print('No')


cases = int(input())
for i in range(cases):
	count = 0
	size = int(input())
	arr = input().split()
	for e in range(size * 2):
		arr[e] = int(arr[e])
		arr[e] = int((arr[e] / 2 - int(arr[e] / 2)) * 2)
		if arr[e] == 1:
			count += 1
	if count == size:
		print('Yes')
	else:
		print('No')


from functools import lru_cache
import copy
import math
import sys
fin = None
fout = None
uabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
abet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def start(filename):
	filename = filename.replace('.py', '')
	global fin
	global fout
	infile = filename + '.in'
	outfile = filename + '.out'
	fin = open(infile)
	fout = open(outfile, 'w')

def permutation(lst):
	if len(lst) == 0:
		return []
	if len(lst) == 1:
		return [lst]
	l = []
	for i in range(len(lst)):
		m = lst[i]
		remLst = lst[:i] + lst[i + 1:]
		for p in permutation(remLst):
			l.append([m] + p)
	return l

def subsets(x):
	retset = []
	if len(x) == 0:
		retset = [[]]
	else:
		first = x[-1]
		cop = x.copy()
		cop.remove(first)
		y = subsets(cop)
		retset.extend(copy.deepcopy(y))
		m = copy.deepcopy(y)
		for i in range(len(y)):
			k = m[0]
			m.remove(k)
			k.append(first)
			m.append(k)
		retset.extend(m.copy())
	return retset

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __str__(self):
		return str(self.x) + str(self.y)

	def __hash__(self):
		return hash(str(self))

	def __eq__(self, other):
		return self.x == other.x and self.y == other.y

class frac:

	def __init__(self, n, d):
		self.n = n
		self.d = d

	def __str__(self):
		return str(self.n) + '/' + str(self.d)

	def __hash__(self):
		return hash(str(self))

	def simp(self):
		div = math.gcd(self.n, self.d)
		self.n = self.n / div
		self.d = self.d / div

	def __eq__(self, other):
		return self.n / self.d == other.n / other.d

	def __lt__(self, other):
		return self.n / self.d < other.n / other.d

class Interval:

	def __init__(self, start, end):
		self.start = start
		self.end = end

	def __str__(self):
		return str(self.start) + str(self.end)

	def __hash__(self):
		return hash(str(self))

	def __eq__(self, other):
		return self.start == other.start and self.end == other.end

	def __lt__(self, other):
		return self.start < other.start

class Graph:

	def __init__(self, vertices):
		self.V = vertices
		self.graph = [[0 for column in range(vertices)] for row in range(vertices)]

	def minDistance(self, dist, sptSet):
		min = sys.maxsize
		min_index = -1
		for v in range(self.V):
			if dist[v] < min and sptSet[v] == False:
				min = dist[v]
				min_index = v
		if min_index == -1:
			for v in range(self.V):
				if not sptSet[v]:
					min_index = v
					break
		return min_index

	def dijkstra(self, src):
		dist = [sys.maxsize] * self.V
		dist[src] = 0
		sptSet = [False] * self.V
		for cout in range(self.V):
			u = self.minDistance(dist, sptSet)
			sptSet[u] = True
			for v in range(self.V):
				if self.graph[u][v] > 0 and sptSet[v] == False and (dist[v] > dist[u] + self.graph[u][v]):
					dist[v] = dist[u] + self.graph[u][v]
		return dist

def overlap(verl1, verl2):
	if verl1.end >= verl2.start:
		return True
	else:
		return False

def merge(verl1, verl2):
	retverl = Interval(min(verl1.start, verl2.start), max(verl1.end, verl2.end))
	return retverl

def changeBase(num, base):
	if base == 2:
		return '{0:b}'.format(num)
	power = math.floor(math.log(num, base))
	remainder = num
	end = []
	iter = list(range(power + 1))
	iter.reverse()
	for i in iter:
		if remainder >= base ** i:
			(q, r) = divmod(remainder, base ** i)
			end.append(q)
			remainder = r
		else:
			end.append(0)
	retlist = []
	for i in end:
		if i > 9:
			retlist.append(uabet[i - 10])
		else:
			retlist.append(i)
	retlist = map(str, retlist)
	return ''.join(retlist)

def prime(num):
	if num == 2:
		return True
	if num % 2 == 0:
		return False
	for i in range(2, math.ceil(num ** 0.5) + 1):
		if num % i == 0:
			return False
	return True

def solve(n, a):
	o = 0
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == o:
		return 'Yes'
	return 'No'

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split(' ')))
		print(solve(n, a))
main()


import bisect
import sys
import collections
import math
inf = sys.maxsize

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	arr = get_array()
	odd = 0
	even = 0
	for ele in arr:
		if ele % 2:
			odd += 1
		else:
			even += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	count = 0
	for i in range(2 * n):
		if arr[i] % 2 == 0:
			count += 1
	if count == n:
		print('yEs')
	else:
		print('nO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ecount = 0
	ocount = 0
	for i in l:
		if i % 2 == 0:
			ecount += 1
		elif i % 2 == 1:
			ocount += 1
	if abs(ecount - ocount) < 2:
		print('Yes')
	else:
		print('No')


import sys
readline = sys.stdin.readline
T = int(readline())
for t in range(T):
	N = int(readline())
	A = list(map(int, readline().split()))
	cnt = 0
	for a in A:
		if a & 1:
			cnt += 1
	if cnt == N:
		print('Yes')
	else:
		print('No')


import sys

def I():
	return int(sys.stdin.readline().rstrip())

def MI():
	return map(int, sys.stdin.readline().rstrip().split())

def LI():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def LI2():
	return list(map(int, sys.stdin.readline().rstrip()))

def S():
	return sys.stdin.readline().rstrip()

def LS():
	return list(sys.stdin.readline().rstrip().split())

def LS2():
	return list(sys.stdin.readline().rstrip())
t = I()
for _ in range(t):
	n = I()
	A = LI()
	count = sum((a % 2 == 0 for a in A))
	if count == n:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	print('Yes' if sum([1 for e in map(int, input().split()) if e % 2]) == n else 'No')


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	for i in a:
		if i % 2 == 0:
			c1 += 1
		else:
			c2 += 1
	if c1 == c2:
		print('Yes')
	else:
		print('No')
	t -= 1


import math, bisect, heapq
for t in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	(e, o) = (0, 0)
	for i in a:
		if i % 2:
			o += 1
		else:
			e += 1
	if e == o:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	j = [a for a in x if a % 2 == 1]
	if len(j) == n:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	n_even = sum((v[-1] in '02468' for v in input().split()))
	print(('No', 'Yes')[n_even == n])


for _ in range(int(input())):
	k = int(input())
	target = list(map(int, input().split()))
	(ev, od) = (0, 0)
	for i in target:
		if i & 1:
			od += 1
		else:
			ev += 1
	if od == ev:
		print('Yes')
	else:
		print('No')


i = int(input())
for e in range(i):
	_ = input()
	(lambda l: print('Yes' if len([j for j in l if j % 2 == 0]) == len([x for x in l if x % 2 != 0]) else 'No'))([int(r) for r in input().split()])


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	for j in l:
		if j % 2 == 0:
			c1 = c1 + 1
		else:
			c2 = c2 + 1
	if c2 > c1 or c2 == 0 or c1 > c2:
		print('No')
	else:
		print('Yes')


import sys, io, os, math
try:
	yash = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
except:
	yash = lambda : sys.stdin.readline().encode()
I = lambda : [*map(int, yash().split())]
for t in range(I()[0]):
	(n,) = I()
	lis = I()
	(cnto, cnte) = (0, 0)
	for i in lis:
		if i & 1:
			cnto += 1
		else:
			cnte += 1
	print('YES' if cnto == cnte else 'NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	even = []
	odd = []
	for i in arr:
		if i % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	if len(odd) == len(even):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split()]
	c = 0
	for i in l:
		if i % 2:
			c += 1
	if c == n:
		print('Yes')
	else:
		print('No')


import os
import sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from functools import reduce
from io import BytesIO, IOBase
from itertools import combinations
from math import gcd, inf, sqrt, ceil, floor

def lcm(a, b):
	return a * b // gcd(a, b)
MAXN = 1000004
spf = [0 for i in range(MAXN)]

def sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(sqrt(MAXN))):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def getFactorization(x):
	ret = Counter()
	while x != 1:
		ret[spf[x]] += 1
		x = x // spf[x]
	return ret

def printDivisors(n):
	i = 2
	z = [1, n]
	while i <= sqrt(n):
		if n % i == 0:
			if n / i == i:
				z.append(i)
			else:
				z.append(i)
				z.append(n // i)
		i = i + 1
	return z

def create(n, x, f):
	pq = len(bin(n)[2:])
	if f == 0:
		tt = min
	else:
		tt = max
	dp = [[inf] * n for _ in range(pq)]
	dp[0] = x
	for i in range(1, pq):
		for j in range(n - (1 << i) + 1):
			dp[i][j] = tt(dp[i - 1][j], dp[i - 1][j + (1 << i - 1)])
	return dp

def enquiry(l, r, dp, f):
	if l > r:
		return inf if not f else -inf
	if f == 1:
		tt = max
	else:
		tt = min
	pq1 = len(bin(r - l + 1)[2:]) - 1
	return tt(dp[pq1][l], dp[pq1][r - (1 << pq1) + 1])

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	x = []
	for i in range(2, n + 1):
		if prime[i]:
			x.append(i)
	return x

def main():
	for _ in range(int(input())):
		n = int(input())
		a = [int(X) for X in input().split()]
		if 1:
			(od, ev) = (0, 0)
			for i in a:
				if i % 2:
					od += 1
				else:
					ev += 1
			if ev == od and od == n:
				print('Yes')
			else:
				print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


a = int(input())
for i in range(a):
	b = int(input())
	c = input().split()
	d = 0
	for i in range(b * 2):
		if int(c[i]) % 2 == 1:
			d += 1
	if d == b:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) % 2 for i in input().split()]
	s = sum(a)
	if s == n:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	a = int(input())
	l = map(int, input().split())
	bakoiti = 0
	bikoiti = 0
	for i in l:
		if i % 2 == 0:
			bikoiti += 1
		else:
			bakoiti += 1
	if bikoiti == bakoiti:
		print('Yes')
	else:
		print('No')


t = int(input())
res = []
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	(d0, d1) = (0, 0)
	for el in a:
		if el % 2 == 0:
			d0 += 1
		else:
			d1 += 1
	if d1 != d0:
		res.append('No')
	else:
		res.append('Yes')
for el in res:
	print(el)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in range(2 * n):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('YES')
	else:
		print('NO')


ans = []
for _ in range(int(input())):
	n = int(input())
	odd = [int(x) % 2 for x in input().split()]
	ans += [['No'], ['Yes']][sum(odd) == n]
print('\n'.join(ans))


N = int(input())
X = []
LIST = []
for i in range(N):
	x = int(input())
	L = list(map(int, input().split()))
	X.append(x)
	LIST.append(L)
for i in range(N):
	x = [num for num in LIST[i] if num % 2 == 0]
	if X[i] == len(x):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	for elem in a:
		if elem % 2 == 1:
			count += 1
	if count == n:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	e = len(list(filter(lambda x: x % 2 == 0, arr)))
	print('Yes' if e == 2 * n - e else 'No')


t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = map(int, input().split())
	even = 0
	odd = 0
	for num in arr:
		if num % 2:
			odd += 1
		else:
			even += 1
	if odd == even:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = []
	n1 = 0
	n2 = 0
	n = int(input())
	k = input().split()
	for i in range(2 * n):
		a.append(int(k[i]))
		if int(k[i]) % 2 == 0:
			n1 = n1 + 1
		else:
			n2 = n2 + 1
	if n1 == n2:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	size = int(input())
	nums = input().split()
	for num in nums:
		if int(num) % 2 == 0:
			size -= 1
	if size == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for it in range(t):
	n = int(input())
	a = [int(tmp) for tmp in input().split()]
	n_even = 0
	n_odd = 0
	for ai in a:
		if ai % 2 == 0:
			n_even += 1
		else:
			n_odd += 1
	if n_even == n_odd:
		print('Yes')
	else:
		print('No')


cases = int(input())
for z in range(cases):
	num = int(input())
	mylist = [int(i) for i in input().split()]
	even = 0
	odd = 0
	for i in range(0, len(mylist)):
		if mylist[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == odd:
		print('Yes')
	else:
		print('No')


from collections import defaultdict, deque
import sys
input = lambda : sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	count_odd = 0
	count_even = 0
	for i in a:
		if i % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
	print('Yes' if count_odd == count_even else 'No')


a = int(input())
for i in range(0, a):
	b = int(input())
	arr = list(map(int, input().split()))
	s = 0
	s1 = 0
	for i in range(len(arr)):
		if arr[i] % 2 == 0:
			s = s + 1
		else:
			s1 = s1 + 1
	if s == s1:
		print('Yes')
	else:
		print('No')