def solve(): N = int(input()) A = list(map(int, input().split())) if N % 2 == 0: print("Yes") return else: ls = [i % 2 for i in range(N)] if A == ls: print("No") return ls = [(i + 1) % 2 for i in range(N)] if A == ls: print("No") return print("Yes") return T = int(input()) for _ in range(T): solve()