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



Sample input:
3
1 2 3


Sample output:
YES

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input();print('YNEOS'[sum(map(int,input().split()))%2::2])

Submission status: Accepted

Solution code:
input();print('YNEOS'[sum(int(i)%2for i in input().split())%2::2])

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

for num in a:
    if num % 2 == 1:
        count += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main10():
    buf = int(input(""));
    strbuf = input("");
    strbufs = strbuf.split();
    buf2 = [];
    for i in range(buf):
        buf2.append(int(strbufs[i]));
    if len(buf2) == 1:
        return("YES");
    else:
        ki = 0;
        for i in range(buf):
            if buf2[i] % 2 == 1:
                ki += 1;
        if ki % 2 == 0:
            print("YES");
        else:
            print("NO");



if __name__ == '__main__':
    main10()

Submission status: Accepted

Solution code:
[print(['YES','NO'][len(list(filter(lambda x:x%2,map(int,input().split(' ')))))%2]) for _ in [input()]]

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

N = int(input())
aa = inpl()

tmp = 0
for a in aa:
    if a%2 == 1:
        tmp += 1

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

n = ni()
a = li()

odd = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f=lambda x:1 if int(x)%2 else 0
n=input()
c=sum(map(f,input().split()))%2

if c:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
n = int(input())
m = len(list(filter(lambda x: int(x)%2==1, input().split())))
print(["NO","YES"][(n-m)*(m%2)==0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
a = [int(i) for i in input().split()]
b = [i%2 for i in a]
c = Counter(b)
if c[1] % 2 == 1:
  print('NO')
else:
  print('YES')

Submission status: Accepted

Solution code:
input()
s = [int(x) % 2 for x in input().split()]
ans = "YES" if sum(s) % 2 == 0 else "NO"
print(ans)

Submission status: Accepted

Solution code:
n = input()
v = map(int, raw_input().split(' '))
if sum([i % 2 for i in v]) % 2 == 0:
	print "YES"
else:
	print "NO"

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]

t = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
s = 0
for i in range(N):
	if A[i] % 2 == 1:
		s += 1

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

Submission status: Accepted

Solution code:
n = int(input())

arr = map(int,raw_input().split())

odd = 0

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

print 'YES' if odd % 2 == 0 else 'NO'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = []
count = 0

for i in A:
    if i % 2 != 0:
        B.append(1)
    else:
        B.append(0)

for i in B:
    if i == 1:
        count += 1
else:
    if count % 2 != 0:
        print("NO")
    else:
        print("YES")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
print("NO" if len([x for x in a if x & 1]) & 1 else "YES")

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
odd = 0

for i in range(n):
  if a[i]%2 != 0:
    odd += 1
else:
  if odd % 2 == 0:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

Solution code:
n = int(raw_input())
a = map(int,raw_input().split(' '))
if len(filter(lambda x: x % 2 == 1, a)) % 2 == 1:
  print 'NO'
else:
  print 'YES'

Submission status: Accepted

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

odds = 0
for i in nums:
    if(i%2 != 0):
        odds += 1

if(len(nums) <= 1):
    print('YES')
else:
    if(odds%2 == 0):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int, input().split()))
count_odd=0
for number in A:
    if number%2==1:
        count_odd+=1
    else:
        pass
if count_odd%2==1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
array = [int(x) for x in input().split()]

even = 0
odd = 0
for i in array:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1
print("YES" if odd % 2 == 0 else "NO")

Submission status: Accepted

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

odd = len([a for a in src if a%2])
even = N - odd
if odd%2:
    print('NO')
else:
    even += odd//2
    print('NO' if even < 1 else 'YES')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# AtCoder Grand Contest
# Problem A


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# AtCoder Grand Contest
# Problem A


if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))
    odd_count = 0

    for ai in a:
        if ai % 2 == 1:
            odd_count += 1

    even_count = n - odd_count

    if odd_count % 2 == 1:
        if even_count > 0:
            print('NO')
            exit()
        elif even_count == 0 and odd_count == 1:
            print('NO')
            exit()
        else:
            print('YES')
            exit()
    else:
        print('YES')
        exit()

Submission status: Accepted

Solution code:
N=int(input())
A=[int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
_,*A=map(int,open(0).read().split())
print(['YES','NO'][sum(A)%2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
count=0
Ai=list(map(int,input().split()))

for i in range(len(Ai)):
    if Ai[i]%2!=0:
        count+=1

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

Submission status: Accepted

Solution code:
N = int(input())
l = [int(i) for i in input().split()]
cnt = 0
for e in l:
    if int(e) % 2 == 1:
        cnt += 1
if cnt % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

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

num_even = 0
num_odd = 0

for i in range(N):
    if A[i] % 2 == 0:
        num_even += 1
    else:
        num_odd += 1

if (num_even == 0) and (num_odd == 0):
    print("NO")
    sys.exit(0)
if (num_even == 1) and (num_odd == 0):
    print("YES")
    sys.exit(0)
if num_odd == 1 and num_even == 0:
    print("YES")
    sys.exit(0)

if num_odd % 2 == 1:
    print("NO")
    sys.exit(0)

print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = [int(a) for a in input().split()]

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def a_addition(N, A):
    count_odd = 0  # 数列の要素のうち奇数のものの個数
    for a in A:
        if a % 2 == 1:
            count_odd += 1
    # 偶数のペアからは1個の偶数が生成される
    # 奇数が偶数個あれば、余ることなく奇数をペアにして偶数を生成できる
    # 奇数が奇数個あれば、ペアにできない奇数が余ってしまう
    if count_odd % 2 == 0:
        ans = 'YES'
    else:
        ans = 'NO'
    return ans

N = int(input())
A = [int(i) for i in input().split()]
print(a_addition(N, A))

Submission status: Accepted

Solution code:
def read():
    return [int(x) for x in str.split(raw_input())]

n = read()[0]
a = read()
odd, even = 0, 0

for i in a:
    if (i%2 == 0):
        even = even+1
    else:
        odd = odd+1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
A_G = []
A_K = []
for i in A:
    if i % 2 == 0:
        A_G.append(i)
    else:
        A_K.append(i)
if len(A_K) % 2 == 0:
    key = "YES"
elif len(A_G) == 0 or len(A_K) == 0:
    key = "YES"
else:
    key = "NO"
print(key)

Submission status: Accepted

Solution code:
from collections import Counter
n=input()
a=[int(i) % 2 for i in input().split()]
c=Counter(a)

if c[1] % 2 ==1:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
print('YES' if len([i for i in input().split() if int(i)%2 == 1])%2==0 else 'NO')

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read():
    return int(input())


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


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


N = read()
A = readlist()

sum_1 = sum([A[i] % 2 for i in range(N)])
if sum_1 % 2:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A_list = [int(elem) for elem in input().split(' ')]
assert len(A_list) == N

num_odd = sum([A % 2 for A in A_list])
if num_odd % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if k%2 ==1 and g != 0:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
count = 0
for x in range(n):
    if a[x]%2 == 0:
        continue
    else:
        count += 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys, math, copy
# import fractions, itertools
# import numpy as np
# import scipy

HUGE = 2147483647
HUGEL = 9223372036854775807
ABC = "abcdefghijklmnopqrstuvwxyz"

def main():
    n = int(input())
    ai = list(map(int, input().split()))
    assert len(ai) == n
    num_odd = len([a for a in ai if a % 2 == 1])
    print("YES" if num_odd % 2 == 0 else "NO")

main()

Submission status: Accepted

Solution code:
n = int(input())
cou1 = 0
cou2 = 0
lis = list(map(int,input().split()))
for i in range(n):
  if lis[i] % 2 == 1:
    cou1 += 1
  else:
    cou2 += 1
if cou1 % 2 == 1:
  print("NO")
  exit()
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

# 偶数はいくつあっても最後にひとつ偶数が残せる
# 奇数が偶数個あったら最後に偶数がひとつ生まれる
# 上二つを消して最後に一つ偶数が生まれる

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = 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')

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
odd = len(list(filter(lambda x: x % 2 == 1, A)))
if odd % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/python3

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

even_count = 0
odd_count = 0

for i in range(N):
    if A[i] % 2 == 0:
        even_count += 1
    else:
        odd_count += 1
    
even_count += odd_count // 2
odd_count = odd_count % 2

if odd_count == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
odd = len(list(filter(lambda x: x%2==1, A)))
if odd % 2 != 1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
N = int(raw_input())
A = [int(x) for x in raw_input().split()]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
even_cnt=0
odd_cnt=0
for i in a:
    if i%2==0:
        even_cnt+=1
    else:
        odd_cnt+=1
if 1<=odd_cnt:
    even_cnt+=odd_cnt//2
    odd_cnt=odd_cnt%2
    even_cnt=even_cnt%2
    if even_cnt==1 and odd_cnt==1:
        print("NO")
    else:
        print("YES")
else:
    print("YES")

Submission status: Accepted

Solution code:
def possible(a):
    cntOdd = 0
    for i in a:
        if (i&1)==1:
            cntOdd += 1
    if (cntOdd&1)==0:
        return True
    else:
        return False

def main():
    n = (raw_input().strip())
    a = [int(i) for i in raw_input().strip().split()]
    if possible(a):
        print 'YES'
    else:
        print 'NO'

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
Odd = 0
Even = 0
for i in range(N):
    if A[i]%2==0:
        Even += 1
    else:
        Odd += 1
Even += Odd//2
Odd = Odd%2
if Odd == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N,*A=map(int,open(0).read().split())
print('NO'*(sum(A)%2)or'YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    A = list(map(int ,input().split(" ")))
    cnt = 0
    for a in A:
        if a % 2: cnt += 1

    if cnt % 2:
        print("NO")
    else:
        print("YES")


solve()

Submission status: Accepted

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

neven = 0
nodd = 0

for a_ in a:
    if a_ % 2 == 0:
        neven += 1
    else:
        nodd += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

cnt = 0
for a in A:
    cnt += a % 2

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

Submission status: Accepted

Solution code:
n = int(input())
xs = [int(x)%2 for x in input().split()]

z = 0
o = 0
for x in xs:
    if x == 0: z += 1
    else: o += 1

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")


def main():
    N = int(input())
    a_list = list(map(int, input().split()))

    print("YES" if len([a for a in a_list if a % 2 != 0]) % 2 == 0 else "NO")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
input()
print("NO" if sum(map(lambda x:int(x)%2,input().split()))%2 else "YES")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
_ = int(input())
even = 0
odd = 0
for a in map(int, input().split()):
    if a % 2 == 0:
        even += 1
    else:
        odd += 1
ans = odd % 2 == 0 or (even == 0 and odd == 1)
print(['NO', 'YES'][ans])

Submission status: Accepted

Solution code:
def addition():
	n = int(raw_input())
	a = map(int, raw_input().split(" "))
	odd_count = 0
	for x in a:
		if x%2==1:
			odd_count+=1
	if odd_count%2==1:
		print "NO"
	else:
		print "YES"


if __name__ == "__main__":
	addition()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
yes, no = "YES", "NO"
N = int(input())
A = list(map(int, input().split()))
even, odd = 0, 0

for e in A:
	if e % 2 == 0:
		even += 1
	else:
		odd += 1

if odd % 2 == 0:
	print(yes)
else:
	print(no)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
oddNum = [ tmp for tmp in A if tmp%2 != 0 ]
if len(oddNum)%2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
n = input()
A = map(int, raw_input().strip().split())
A = filter(lambda x: x % 2 == 1, A)
m = len(A)
print "YES" if (m % 2 == 0) else "NO"

Submission status: Accepted

Solution code:
n = int(raw_input())
l = map(int, raw_input().split())
ll = [x for x in l if x % 2 == 1]
if len(ll) % 2 == 0 or len(l) == 1:
    print 'YES'
else:
    print 'NO'

Submission status: Accepted

Solution code:
N = int(raw_input().strip())
A = map(int, raw_input().strip().split(" "))

odd  = 0
for i in range(0, N):
    if(A[i] % 2 != 0):
        odd += 1

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

Submission status: Accepted

Solution code:
# coding: utf-8
num_N = int(input())
l_num = list(map(int, input().split()))

odd = 0
for num in l_num:
    if num % 2 == 1:
        odd += 1

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
cnt = [0, 0]
for v in a:
    cnt[v%2] += 1
if (cnt[1]%2 == 0) or (cnt[1]%2 == 1 and cnt[0] == 0):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
N = int(raw_input())
A = map(lambda x:int(x)%2, raw_input().split())
if len(A) == 1:
    print 'YES'

#print A
N_odd = sum(A)
N_even = N - N_odd
#print N_odd, N_even

if N_odd % 2 ==0:
    print 'YES'
else:
    print 'NO'

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
A = list(filter((lambda x: x%2 == 1),L))
if len(A)%2 == 1:
	print("NO")
else:
	print("YES")

Submission status: Accepted

Solution code:
N=int(raw_input())
a=map(int,raw_input().split())
c=0
for i in a:
    if(i%2==1):
        c+=1
if(c%2==1):
    print "NO"
else:
    print "YES"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
odd=0
A=input().split(" ")
for i in range(N):
    if int(A[i])%2==1:
        odd+=1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
raw_input()
odd_count = 0
for a in raw_input().split():
	if int(a)%2 == 1: odd_count += 1
print 'YES' if odd_count%2==0 else 'NO'

Submission status: Accepted

Solution code:
input()
print("YES" if sum(map(lambda x: int(x) % 2, input().split())) % 2 == 0 else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = raw_input()

A = [int(x) for x in raw_input().split(" ")]

count = 0

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

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

Submission status: Accepted

Solution code:
I=input
n=(I())
a=list(map(int,I().split()))
a=[x for x in a if x&1]
print(['YES','NO'][len(a)&1])

Submission status: Accepted

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

count = 0

for e in a:
	if e % 2 == 1:
		count += 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


N = int(input())
A = map(int,input().split())
on = len([a for a in A if a%2 == 1])
on %= 2

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

Submission status: Accepted

Solution code:
N = int(input())
if sum(int(x) % 2 for x in input().split()) % 2 == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
n = int(raw_input().rstrip())

numbers = map(int,raw_input().rstrip().split(" "))

total = sum(numbers)
d,m = divmod(total,2)
if m == 0:
  print "YES"
else:
  print "NO"

Submission status: Accepted

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

Submission status: Accepted

Solution code:


n = input()

a = [int(i) for i in input().split()]

c = 0

ans = "NO"

for i in a:
    c += i

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

print(ans)

Submission status: Accepted

Solution code:


n = input()

a = [int(i) for i in input().split()]

c = 0

ans = "NO"

for i in a:
    if i%2 == 1:
        c += 1

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

print(ans)

Submission status: Accepted

Solution code:
_ = input()
a = map(int, input().split())

def odd(x):
    return x % 2

print("YES" if odd(sum(map(odd, a))) == 0 else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#AGC010A

n=int(raw_input())
a=map(int,raw_input().split())
cnt=0
for i in xrange(n):
 if a[i]%2!=0:
  cnt+=1
if cnt%2==0:
 print 'YES'
else:
 print 'NO'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
odd_or = sum(list(map(lambda x: x%2,a )))%2
if odd_or == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
print('NO' if len([a for a in A if a & 1]) & 1 else 'YES')