Problem:
 Score : 300 points    Problem Statement There are N integers written on a blackboard. The i -th integer is A_i .  Takahashi will repeatedly perform the following operation on these numbers:   Select a pair of integers, A_i and A_j , that have the same parity (that is, both are even or both are odd) and erase them.  Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j .   Determine whether it is possible to have only one integer on the blackboard.      Constraints  2 ≦ N ≦ 10^5  1 ≦ A_i ≦ 10^9  A_i is an integer.         Input The input is given from Standard Input in the following format:  N  A_1  A_2 … A_N       Output If it is possible to have only one integer on the blackboard, print YES . Otherwise, print NO .        Sample Input 1 3
1 2 3      Sample Output 1 YES  It is possible to have only one integer on the blackboard, as follows:   Erase 1 and 3 from the blackboard, then write 4 . Now, there are two integers on the blackboard: 2 and 4 .  Erase 2 and 4 from the blackboard, then write 6 . Now, there is only one integer on the blackboard: 6 .        Sample Input 2 5
1 2 3 4 5      Sample Output 2 NO

Solution (Python):
N = map(int, input())
A = map(int, input().split())

print("YES" if len(list(filter(lambda x:x%2==1, A))) % 2 == 0 else "NO")

Solution (Python):


import sys
input = sys.stdin.readline

def io_generator():
	return input()



def main(io):
	a=int(io())
	l = list(map(int, io().split()))
	isEven = len([x for x in l if x % 2 == 1]) % 2 == 0
	return 'YES' if isEven else 'NO'



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
odd = [a for a in A if a%2]

if len(odd)%2:
  print('NO')
else:
  print('YES')

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
oddCount = 0
for num in a:
  if num%2 == 1:
    oddCount += 1
if oddCount % 2 == 0:
  print("YES")
else:
  print("NO")

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
g=[]
k=[]
for i in a:
    if i%2==0:
        g+=[i]
        g=[sum(g)]
    else:
        k+=[i]
        if len(k)%2==0:
            g+=[sum(k)]
            k=[]

print('YES'if g==[] or k==[] else 'NO')

Solution (Python):
s = int(input())
h = list(map(int,input().split()))
ans = 0
for i in range(s):
    if h[i]%2 == 1:
        ans += 1
if ans %2==0:
    print("YES")
else:
    print("NO")

Solution (Python):
n=int(input())
arr=list(map(int,input().split()))
count=0
for i in range(n):
  if arr[i]%2==1:
    count+=1
if count%2==1:
  print('NO')
else:
  print('YES')

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
count_odd,count_even = 0,0
judge = 0

for a in A:
  if(a%2 == 0): count_even += 1
  else: count_odd += 1
    
if(count_odd%2 == 0):
  judge = 1

if(judge == 1): print('YES')
else: print('NO')

Solution (Python):
N = int(input())
As = map(int, input().split())

count = 0
for A in As:
    if A % 2 == 1:
        count += 1

if count % 2 == 1:
    print('NO')
else:
    print('YES')

Solution (Python):
def main():
    N = input()
    As = list(map(int, input().split()))

    ct = 0
    for Ai in As:
        if Ai % 2:
            ct += 1
    
    if ct % 2:
        print("NO")
    else:
        print("YES")

main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
if([1 for i in range(n) if a[i] % 2 == 1].count(1) % 2 == 0) : print("YES")
else : print("NO")

Solution (Python):
n,a=open(0);print('YNEOS'[sum(map(int,a.split()))%2::2])

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
odd=0
for i in a:
    if i%2==1:
        odd+=1
print("YES" if odd%2==0 else "NO")

Solution (Python):
N=int(input())
A=[int(i) for i in input().split()]
L=[0,0]
for a in A:
    L[a%2]+=1
if L[1]%2==1:
    print('NO')
else:
    print('YES')

Solution (Python):
n = int(input())
a = map(int, input().split())
cnt = 0
for i in a:
    if i % 2:
        cnt += 1
print("NO" if cnt % 2 else "YES")

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
A = [int(_) for _ in input().split()]
oddnum = 0

for i in A:
    if i % 2 == 1:
        oddnum += 1

print("YES" if oddnum % 2 == 0 else "NO")

Solution (Python):
import sys
input()
count = 0
a_list = list(map(int, input().split()))
for a in a_list:
  count += a%2

print("YES") if count%2==0 else print("NO")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

odds = sum([a % 2 for a in A])
evens = sum([(a+1) % 2 for a in A])

if len(A) == 1:
    print('YES')
    exit()
if odds % 2 == 0:
    print('YES')
    exit()
print('NO')

Solution (Python):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
if sum(A % 2 == 1) % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
N = int(input())
list = list(map(int, input().split()))

if sum(list) % 2 == 0 :
    print('YES')
else :
    print('NO')

Solution (Python):
N = int(input())
list = list(map(int, input().split()))

count = 0
for a in list :
    if a % 2 != 0 :
        count += 1

if count % 2 == 0 :
    print('YES')
else :
    print('NO')

Solution (Python):
N = int(input())
An = map(int, input().split())

odds = 0
evens = 0
for A in An:
    if A%2 == 0:
        evens += 1
    else:
        odds += 1

if odds%2 != 0:
    print("NO")
else:
    print("YES")

Solution (Python):
n = int(input())
s = list(map(int, input().split()))
evens, odds = 0, 0
for i in s:
    if i % 2 == 0:
        evens += 1
    else:
        odds += 1
if odds % 2 == 0:
    ok = True
else:
    ok = False
print('YES' if ok else 'NO')

Solution (Python):
input();print('YNEOS'[sum(map(lambda x:int(x)%2>0,input().split()))%2>0::2])

Solution (Python):
N = int(input())
A = [int(i)%2 for i in input().split()]

if A.count(0) == 0 and A.count(1)==1:
  print("YES")
elif A.count(1)%2==0:
  print("YES")
else:
  print("NO")

Solution (Python):
N = int(input())
A_list = list(map(int, input().split()))
a = sum(A_list)
if a%2 == 0:
	print("YES")
else:
	print("NO")

Solution (Python):
n=int(input())
a= list(map(int,input().split()))
c=0
for i in a:
    if i%2 ==1:
        c+=1

if c%2==0:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
A = list(map(lambda x: x%2, map(int, input().split())))

if A.count(1)%2:
    if A.count(0) > 0:
        print('NO')
    else:
        print('YES')
else:
    print('YES')

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
a = list(map(lambda x: x % 2, a))
print('NO' if sum(a) % 2 == 1 else 'YES')

Solution (Python):
n = int(input())
A = list(map(int,input().split()))

if sum(A)%2 == 1:
    print('NO')
else:
    print("YES")

Solution (Python):
n = int(input())
A = list(map(int,input().split()))

e = 0
o = 0
for a in A:
    if a%2 == 0:
        e += 1
    else:
        o += 1

if o%2 == 1:
    print('NO')
else:
    print("YES")

Solution (Python):
input();print(["YES","NO"][sum(map(int,input().split()))%2])

Solution (Python):
input();print(["YES","NO"][sum([1 if i%2 else 0 for i in list(map(int,input().split()))])%2])

Solution (Python):
input()
c=0
for i in list(map(int,input().split())):
  if i%2:
    c+=1
print("NO" if c%2 else "YES")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
o = 0
for i in a:
  if i%2:
    o += 1
if o%2:
  print("NO")
else:
  print("YES")

Solution (Python):
n = int(input())
a = (int(i) for i in input().split())

oddCount = 0
for i in a:
    if i % 2 != 0:
        oddCount += 1

print("YES") if oddCount % 2 == 0 else print("NO")

Solution (Python):
N = int(input())
A = [int(i)%2 for i in input().split()]

p = A.count(1)
q = A.count(0)

if p%2 != 0:
    print('NO')
else:
    if N == 1:
        print('NO')
    else:
        print('YES')

Solution (Python):
import sys
input = sys.stdin.readline
input()
print('YES' if sum(map(int, input().split())) % 2 == 0 else 'NO')

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
    print("YES") 
else:
    print("NO")

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
    print("YES") 
else:
    print("NO")

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
A = [_ % 2 for _ in A]
if sum(A) % 2 == 0:
    print("YES") 
else:
    print("NO")

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
print("YES" if [i % 2 for i in A].count(1) % 2 == 0 else "NO")

Solution (Python):
n = int(input())
A = [int(i) for i in input().split()]

cnt = 0
for a in A:
    if a % 2 == 1:
        cnt += 1
        
print('YES' if cnt % 2 == 0 else 'NO')

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
odd = [i for i in a if i % 2 == 1]
print('NO') if len(odd) % 2 == 1 else print('YES')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
    if a[i] % 2 == 1:
        cnt += 1

if cnt % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
As = list(map(int, input().split()))
ki_cnt = len([a for a in As if a % 2 == 1])

print("YES" if ki_cnt % 2 == 0 else "NO")

Solution (Python):
def solve():
  n= int(input())
  a = list(int(i) for i in input().split())
  
  odd = 0
  even = 0
  for i in a:
    if i%2 == 0: even += 1
    else: odd+= 1
  if odd %2 == 1 :
    return('NO')
  else:  
    return('YES')
  
  
  
if __name__ == '__main__':
  print(solve())

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
o = 0
for i in range(N):
    if A[i] % 2 == 1:
        o += 1
    else:
        pass
if o % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

even_odd = []
for i in range(n):
  even_odd.append(a[i]%2)

cnt_odd = even_odd.count(1)

if cnt_odd%2 == 1:
  print("NO")
else:
  print("YES")

Solution (Python):
N = int(input())
A_arr = list(map(int, input().split()))

count = 0
for i in range(N):
    if A_arr[i] % 2 == 0:
        pass
    else:
        count += 1

if count % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
cnt = 0
for a in A:
    if a % 2 == 1:
        cnt += 1
print('YES' if cnt % 2 == 0 else 'NO')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
odd,even = 0,0
for i in a:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
even += odd // 2
odd %= 2
if odd == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
if sum(a) % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = 0
c = 0
for i in range(len(a)):
    if a[i]%2 == 0:
        b += 1
    else:
        c += 1
if c%2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
n = int(input())
x = list(map(int, input().split()))
a = 0

for i in range(n):
    if x[i]%2 == 1:
        a += 1

if a%2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def main():
    n = II()
    A = LI()

    odd = 0
    for a in A:
        if a % 2:
            odd += 1
    return 'YES' if odd % 2 == 0 else 'NO'


print(main())

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
odd=0
for x in a:
    if x%2==1:
        odd+=1
if odd%2==1:
    print('NO')
else:
    print('YES')

Solution (Python):
input()
a = sum([int(i) for i in input().split()])
if a % 2 == 0:
  print('YES')
else:
  print('NO')

Solution (Python):


def io_generator():
	return input()



def main(io):
	a=int(io())
	l= map(int, io().split())
	ll=[x for x in l if x%2==1]
	
	return 'YES' if len(ll)%2==0 else 'NO'



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
odds = len([i for i in A if i%2!=0])
if odds%2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n,*a=map(int,open(0).read().split());print("YNEOS"[sum(s%2 for s in a)%2::2])

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
cnt = 0
for i in A:
    if i % 2 == 1:
        cnt += 1

print('YES' if cnt % 2 == 0 else 'NO')

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
oddnumber = len([i for i in A if (i % 2) != 0])
if oddnumber % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

res = 0
for i in range(N):
    if A[i] % 2 == 1:
        res += 1
        
if res%2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
_ = raw_input()
print "YES" if sum(map(lambda s: long(s)% 2, raw_input().split())) % 2 == 0 else "NO"

Solution (Python):
n = int(input())
aa = list(map(int, input().split()))

bin = list(map(lambda x:x%2, aa))
even = bin.count(1)
print('YES' if even%2==0 else 'NO')

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
tmp = 0
for a in A:
    if a % 2 == 1: tmp += 1
if tmp % 2 == 0: print('YES')
else: print('NO')

Solution (Python):
input()
print('NO' if sum(list(map(int,input().split())))%2 else 'YES')

Solution (Python):
import sys
input=sys.stdin.readline
input()
A=list(map(int,input().split()))
odd_cnt,even_cnt=0,0
for a in A:
    if a%2:
        odd_cnt+=1
    else:
        even_cnt+=1
print('NO' if odd_cnt%2 else 'YES')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
bi = [i %2 for i in a]
if sum(bi)%2 ==0:
    print("YES")
else: print("NO")

Solution (Python):
import sys
i = 0
j = 0
a = []
for line in sys.stdin:
    a.append(line)
for x in a[1].split():
  i += int(x) % 2
  j += 1 - int(x) % 2
print("YES" if i % 2 == 0 else "NO")

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
a=[i for i in a if i%2==1]
if len(a)%2==1:print('NO')
else:print('YES')

Solution (Python):
n = int(input())
alist = list(map(int, input().split()))
o, e = 0, 0

for a in alist:
  if a % 2 == 0:
    e += 1
  else:
    o += 1

if o % 2 == 1:
  print('NO')
else:
  print('YES')

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

odd = 0
even = 0

n = ni()
a = list(li())

for ai in a:
    if ai%2:
        odd += 1
    else:
        even += 1
        
if odd%2:
    print("NO")
else:
    print("YES")

Solution (Python):
input();L=print(["YES", "NO"][sum([x%2 for x in map(int,input().split())])%2])

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
odds = len([a for a in A if a%2])
print('NO' if odds%2 else 'YES')

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

count = 0

for i in range(n):
    if a[i] % 2 == 1:
        count += 1

if count % 2 == 1:
    print("NO")
else:
    print("YES")

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

count = 0
for a in A:
    if a%2 == 1:
        count += 1

if count%2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
N = int(input())
A = list(map(int, input().split(" ")))

print(["YES","NO"][sum(A)%2])

Solution (Python):
def solve(a):
    nodd = 0
    for x in a:
        nodd += (x&1)
    return (nodd%2==0)


def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    if solve(A):
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

count = 0

for i in range(N):
    if A[i] % 2 == 1:
        count += 1

if count % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

cnt = len([ai for ai in a if ai % 2 == 1])
ans = 'NO'
if cnt % 2 == 0:
  ans = 'YES'
print(ans)

Solution (Python):
n = int(input())
a = [int(m) for m in input().split()]
oddcnt = 0
for i in range(n):
    if a[i] % 2 == 1:
        oddcnt += 1
if oddcnt % 2 == 1:
    print("NO")
else:
    print("YES")

Solution (Python):
a = int(input())
x= list(map(int, input().split()))
s=0
for i in x:
    if i%2!=0:
        s+=1
if s%2==0:
    print("YES")
else:print("NO")

Solution (Python):
from collections import Counter as C
N = int(input())
A = [int(a)%2 for a in input().split()] + [0, 1, 0, 1]

print(["YES","NO"][C(A)[1]%2])

Solution (Python):
def solve(N, As):
    return "YES" if len([a for a in As if a % 2 == 1]) % 2 == 0 else "NO"

if __name__ == "__main__":
    N = int(input())
    As = list(map(int, input().split(" ")))
    print(solve(N, As))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = [i % 2 for i in a]
print('YES' if b.count(1) % 2 == 0 else 'NO')

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

odd = len(list(filter(lambda x: x % 2 != 0, A)))
even = N - odd

ans = "YES"


if odd == 1 and even == 0:
    odd = odd
elif odd % 2 == 1:
    ans = "NO"
print(ans)

Solution (Python):


import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def ceil(a, b=1): return int(-(-a // b))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = LIST()







cnt = len([i for i in A if i % 2 == 1])
if cnt % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
li = list(map(int, input().split()))

ans = sum(li) % 2
ans = 'NO' if ans else 'YES'

print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
if sum(a)%2:
    print("NO")
else:
    print("YES")

Solution (Python):
a = int(input())
ar = list(map(int,input().split(" ")))
count = 0
for r in ar:
  if r % 2 == 1:
    count += 1
if count % 2 == 0:
  print("YES")
else:
  print("NO")

Solution (Python):
import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    N = ii()
    A = il()
    return "YES" if sum(A) % 2 == 0 else "NO"


if __name__ == "__main__":
    print(solve())

Solution (Python):
c=input()
a=list(map(int,input().split()))
b=[i%2 for i in a]
print("YES"if sum(b)%2!=1else"NO")

Solution (Python):
c=int(input())
a=list(map(int,input().split()))
b=[i%2 for i in a]
print("YES"if sum(b)%2!=1 or c<2 else"NO")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
  ans = (ans + i % 2) % 2
if ans == 0:
  print("YES")
else:
  print("NO")

Solution (Python):
f=lambda x:int(x)%2
n=int(input())
a=list(map(f,input().split())).count(1)
print('YNEOS'[n>1 and a%2>0::2])

Solution (Python):
N = int(input())

A = list(map(int, input().split()))

c = 0

for i in range(N):
    if A[i]%2==1:
        c = c+1

if c%2==0:
    print('YES')
else:
    print('NO')

Solution (Python):


n = int(input())
nums = [int(s) for s in input().split()]

cnt = 0

for i in nums:
    if i%2 != 0:
        cnt += 1
        
if cnt%2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = 0
for i in range(n):
        if a[i] % 2 != 0:
         	b += 1
if b % 2 == 0:
         print("YES")
else:
         print("NO")

Solution (Python):
N = int(input())

even = 0

for i in input().split():
    if int(i) % 2 != 0:
        even += 1

print('NO' if even % 2 == 1 else 'YES')

Solution (Python):
N = int(input())

odd = 0
even = 0

for i in input().split():
    if int(i) % 2 == 0:
        odd += 1
    else:
        even += 1

if even % 2 == 1:
    print('NO')
else:
    print('YES')

Solution (Python):
n = input()
if(len([x for x in map(int, raw_input().split()) if x % 2 == 1]) % 2 == 0):
    print "YES"
else:
    print "NO"

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
cnt=0
for i in range(N):
    if A[i]%2==1:
        cnt+=1
if cnt%2==1:
    print("NO")
else:
    print("YES")

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
As = list(map(int, input().split()))

odd = 0
for a in As:
    odd += a % 2
if odd % 2:
    print('NO')
else:
    print('YES')

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
odd_count = 0
for e in A:
    if e % 2 == 1:
        odd_count += 1
print("YES" if odd_count % 2 == 0 else "NO")

Solution (Python):
N=int(input())
A=[int(i) for i in input().split()]
a=0
b=0
for i in A:
    if i%2==0:
        a+=1
    else:
        b+=1
if b%2==1:
    print('NO')
else:
    print('YES')

Solution (Python):



def main():
    """Function."""
    n = int(input())
    a = list(map(int, input().split()))

    o_count, e_count = 0, 0
    for i in range(n):
        if a[i] % 2 == 0:
            e_count += 1
        else:
            o_count += 1

    if o_count == 0:
        print("YES")
    elif e_count == 0:
        if o_count % 2 == 0:
            print("YES")
        else:
            print("NO")
    else:
        if o_count % 2 == 0:
            print("YES")
        else:
            print("NO")


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

bl = sum(1 for x in a if x % 2 == 1) % 2 == 0
print('YES' if bl else 'NO')

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
a=0
for i in A:
    if i%2==1:
        a+=1
if a%2==0:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

odd = 0
for a in A:
    if a%2==1:
        odd += 1
print("YES" if odd%2==0 else "NO")

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ki = 0
for i in a:
  if i%2==1:
    ki+=1
if ki%2 == 1:
  print("NO")
else:
  print("YES")

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]


binary = 0
nonBinary = 0
for _a in a:
    if _a % 2 == 0:
        binary += 1
    else:
        nonBinary += 1
if nonBinary % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    a[i] = a[i]%2

l = a.count(1)
b = len(set(a))

if b == 1:
    print('YES')
elif a.count(1)%2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
N = int(input())
count = [0, 0]
for _ in input().split():
    count[int(_) % 2] += 1
if count[1]:
    count[0] += 1
    count[1] %= 2
if bool(count[0]) ^ bool(count[1]):
    print('YES')
else:
    print('NO')

Solution (Python):
def inpl(): return [int(i) for i in input().split()]
N = int(input())
A = inpl()
if sum(A)%2:
    print('NO')
else:
    print('YES')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

res = 0
for i in range(n):
    if a[i]%2==1:
        res += 1

if res % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
def main() -> None:
    n = int(input())
    a = [int(s) for s in input().split()]
    od = 0
    ev = 0

    for i in range(n):
        if a[i] % 2 == 0:
            ev += 1
        else:
            od += 1

        if od == 2:
            od = 0
            ev += 1

        if ev == 2:
            ev = 1

    print("YES" if ev + od == 1 else "NO")


if __name__ == '__main__':
    main()

Solution (Python):
import sys


def next_str() -> str:
    result = ""
    while True:
        tmp = sys.stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


def next_int() -> int:
    return int(next_str())


def main() -> None:
    n = next_int()
    od = 0
    ev = 0

    for i in range(n):
        a = next_int()
        if a % 2 == 0:
            ev += 1
        else:
            od += 1

        if od == 2:
            od = 0
            ev += 1

        if ev == 2:
            ev = 1
    
    print("YES" if ev + od == 1 else "NO")


if __name__ == '__main__':
    main()

Solution (Python):

n = int(input())
a = list(map(int, input().split()))

o = 0
e = 0
for x in a:
    if x%2==0:
        e += 1
    else:
        o += 1

e += (o//2)
o %= 2

if o==0 and e>0:
    print("YES")
elif o==1 and e==0:
    print("YES")
else:
    print("NO")

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
m = [i%2 for i in l]
print("YNEOS"[m.count(1)%2==1::2])

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
num = 0
for i in A:
    num += int(i % 2 != 0)

if num % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=[i for i in a if i%2==1]
print(["NO","YES"][len(b)%2==0])

Solution (Python):
N = int(input())
print('NO' if len(list(filter(lambda x: x%2, map(int, input().split()))))%2 else 'YES')

Solution (Python):
N = int(input())
A = [int(a)%2 for a in input().split()]
print("YES" if sum(A)%2==0 else "NO")

Solution (Python):
N = int(input())
A = [int(a) for a in input().split()]
odd = 0
for a in A:
    odd += a%2
print("YES" if odd%2==0 else "NO")

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

ans = 0
for i in range(N):
	if A[i] % 2 == 1:
		ans += 1
		
if ans % 2 == 0:
	print('YES')
else:
	print('NO')

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = [x%2 for x in a]
if sum(b)%2 == 1:
  print("NO")
else:
  print("YES")

Solution (Python):
_ = input()
a = list(filter(lambda x: int(x) % 2 == 1, input().split()))
print('YES' if len(a) % 2 == 0 else 'NO')

Solution (Python):
n = int(input())
a = list(filter(lambda x: int(x) % 2 == 1, input().split()))
print('YES' if len(a) % 2 == 0 else 'NO')

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
A = []
B = []
for i in range(N) :
    if L[i] % 2 == 0 :
        A.append(L[i])
    else :
        B.append(L[i])
if len(B) % 2 == 0 :
    print("YES")
else :
    print("NO")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

tmp = 0
for a in A:
    tmp += a%2
if tmp %2 == 0:
    print('YES')
else:
    print('NO')

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

even = 0
odd = 0
ans = "NO"
for i in range(N):
    if A[i]%2 == 0:
        even += 1
    else:
        odd += 1

if odd%2 == 0:
    ans = "YES"

print(ans)

Solution (Python):
def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

n = getN()

arr = getlist()

odd = 0
even = 0

for a in arr:
    if a % 2 == 0:
        even += 1
    else:
        odd += 1

even += odd // 2
odd = odd % 2

if n == 2:
    if odd == 1:
        print("NO")
    else:
        print("YES")
else:
    if odd == 1:
        print("NO")
    else:
        print("YES")

Solution (Python):
N=int(input())
A=[int(i) for i in input().split(' ')]
count=0
for a in A:
  if a%2!=0:
    count+=1
print('YES' if count%2==0 else 'NO')

Solution (Python):


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

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
a=[i%2 for i in a]
b=a.count(1)
if b%2==0:print('YES')
else:print('NO')

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
if sum(a)%2==0:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a = [a[i] % 2 for i in range(n)]
even = a.count(0)
odd = a.count(1)
if even != 0:
    even = 1
if odd % 2:
    odd = 1
else:
    odd = 0
    even = 1

if odd + even == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
a_list = list(map(int, input().split()))

even_list = [i for i in a_list if i % 2 == 0]
odd_list = [j for j in a_list if j % 2 == 1]

even_count = len(even_list)
odd_count = len(odd_list)

if odd_count % 2 !=0:
    print("NO")
else:
    print("YES")

Solution (Python):
n=int(input())
s=input().split()
i=0
count=0
while i<n:
  if int(s[i])%2!=0:
    count+=1
  i+=1
if count%2==0:
  print("YES")
else:
  print("NO")

Solution (Python):
n = raw_input()

a = map(int, raw_input().split())
a = [x for x in a if x%2]
if len(a)%2:
    print "NO"
else:
    print "YES"

Solution (Python):
import sys

N = int(sys.stdin.readline().strip())

l = list(map(int, sys.stdin.readline().strip().split(" ")))

odd_num = len(list(filter(lambda x: x % 2 == 1, l)))
even_num = len(list(filter(lambda x: x % 2 == 0, l)))

if odd_num % 2 == 1:
    print("NO")
else:
    print("YES")

Solution (Python):
N=input();print("YNEOS"[len([int(i)for i in input().split()if int(i)%2])%2::2])

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

cnt = 0 
for x in A:
  if x%2 == 1:
    cnt += 1
    
if cnt % 2 == 0:
  print("YES")
else:
  print("NO")

Solution (Python):
N = int(input())
As = list(map(int, input().split()))

num = 0
for A in As:
    if A % 2:
        num += 1

if num % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
n=input()
a=map(int, raw_input().split())
a=[value%2 for value in a]
print "NO" if a.count(1)%2 else "YES"

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

Solution (Python):
n = int(input())
listA = list(map(int, input().split()))

gusuC=0
kisuC=0

index=0
while index < len(listA):
    if listA[index]%2==0:
        gusuC+=1
    else:
        kisuC+=1
    index+=1

if kisuC%2==0:
    print("YES")
else:
    if gusuC==0:
        print("YES")
    else:
        print("NO")