q=int(input())
for ele in range(q):
    s = str(input())
    cnt0 = 0
    cnt1 = 0
    for s_ele in s:
        if s_ele == '0':
            cnt0 += 1
        else:
            cnt1 += 1
    if (cnt0 % 2 ==1) and (cnt1 %2 == 1):
        print('No')
    else:
        print('Yes')