A number can be called v-number if the sum of the lower half of the array is equal to the sum of the upper half of the array.

EXAMPLE:

if num = 1221

sum of lower half = 3

sum of upper half = 3

then it can be called as v-number

INPUT:
First line consists of number of test cases T. Next T lines consists of a number N.

OUTPUT:
For every number N print  "YES"(without quotes) if the number is V-number else "NO"(without quotes)

SAMPLE INPUT
2
12
1230

SAMPLE OUTPUT
NO
YES
t=input()
while t:
	s=raw_input()
	l=len(s)
	a,b=s[:l/2],s[l/2:]
	a=list(a)
	b=list(b)
	x=0
	y=0
	for i in a:
		x+=int(i)
	for i in b:
		y+=int(i)
	if x==y:
		print "YES"
	else:
		print "NO"
	t-=1