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:
n = int(input())
a = list(map(int,input().split()))
num = sum(i%2!=0 for i in a)
#num1 = sum(i%2==0 for i in a)
#print(num)
if num % 2 != 0:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
c = 0
for ai in (map(int, input().split())):
  if ai % 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()))
c = 0
for ai in a:
  if ai % 2 == 1:
    c += 1

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

Submission status: Accepted

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

# 偶数２つ　→　偶数
# 奇数２つ　→　偶数

# 奇数が偶数個ある必要がある
# 偶数は何個でも構わない

if sum(map(lambda x : x % 2, As)) % 2 == 0:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
O = []
E = []
for a in A:
    if a % 2 == 0:
        E.append(a)
    else:
        O.append(a)

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

Submission status: Accepted

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

m = 0
for i in range(n):
  m += as_[i]%2

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

Submission status: Accepted

Solution code:
n = int(input())
board = list(map(int, input().split()))
count = 0

for a in board:
    if a % 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()))
#11->0, 00->0
count = 0
for i in range(n):
    if a[i]%2 == 1:
        count += 1 
if count%2 == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
od = sum(int(x)&1 for x in input().split())
ev = N - od

x = od // 2
od -= 2*x
ev += 2*x
ev = min(ev,1)

rest = od + ev
answer = 'YES' if rest == 1 else 'NO'
print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


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

odds = 0
for x in a:
    if x % 2 != 0:
        odds += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_,a=open(0);print("YNEOS"[sum(int(i)%2for i in a.split())%2::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
print('NO' if len(list(filter(lambda x: x % 2, [int(i) for i in input().split()]))) % 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 != 0:
        odd += 1
if odd % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# 奇数の数が奇数個ならあまる（偶数はいくつあっても最終的に1つの偶数にできるので関係ない）

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
even=0
odd=0
for i in range(n):
  if a[i]%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()))

count = 0
for i in A:
    if i%2 == 1: #奇数の時
        count += 1

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# AGC010A - Addition
def main():
    n = int(input())
    A = tuple(map(int, input().rstrip().split()))
    print("YES" if sum(A) % 2 == 0 else "NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# AGC010A - Addition
def main():
    n = int(input())
    A = tuple(map(int, input().rstrip().split()))
    flg = sum(i % 2 == 1 for i in A) % 2 == 0
    print("YES" if flg else "NO")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

odd = 0
for a in a_list:
    if a % 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()))

odd = 0
even = 0

for a in A:
    if a % 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()))

odd = 0
for a in A:
    if a % 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()))

odd = sum([a % 2 for a in A])
print("YES" if odd % 2 == 0 else "NO")

Submission status: Accepted

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

ans = len([a for a in A if a % 2 == 1])

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

Submission status: Accepted

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

c = 0
for a in A:
    if a % 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()))
kazu = len([x for x in A if x%2 == 1])
if kazu%2==1:
  print('NO')
else:
  print('YES')

Submission status: Accepted

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

import sys

sys.setrecursionlimit(10**7)


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h() if m > 1 else typ(input()) for _ in range(n)]


def main():
    read_h()
    A = read_h()

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

k = [1 if A[i]%2==1 else 0 for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

YES = "YES"  # type: str
NO = "NO"  # type: str

def solve(N: int, A: "List[int]"):
    l = [0 if(i%2 == 0) else 1 for i in A]
    if(sum(l) == 0 or l.count(1)%2 == 0):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
even = 0
odd = 0
for a in A:
    if a % 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==1:
    s+=1
print('YES' if s%2==0 else 'NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
dat_a = map(int, input().split())
dat_a = list(dat_a)
o = e = 0
for i in range(n):
    if dat_a[i] % 2 == 0:
        e += 1
    else:
        o += 1
#print()
#print("o,e:{0}, {1}".format(o,e))

if o % 2 == 1:
    print("NO")
else:
    e += o // 2
    #print()
    #print("o,e:{0}, {1}".format(o, e))
    print("YES")

Submission status: Accepted

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

odd = 0
even = 0

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in 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")

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in 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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
data = [int(x) for x in stdin.readline().rstrip().split()]
cnt = 0
for i in data:
    if 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()))
cou = 0
for i in a:
  if i % 2 == 1:
    cou += 1
print("YES" if cou % 2 == 0 else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1


z = count % 2

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

Submission status: Accepted

Solution code:

a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

z = divmod(count,2)


if z[1] == 1:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
N = int(input())
*A, = map(int, input().split())
odd = [a for a in A if a % 2 == 1]
print('YES' if len(odd) % 2 == 0 else 'NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
even = 0
odd = 0
for aa in a:
    if aa % 2 == 0:
        even += 1
    else:
        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()))
out = 0
for i in range(n):
    if a[i] % 2 == 1:
        out += 1
if out % 2 == 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Addition
https://atcoder.jp/contests/agc010/tasks/agc010_a

"""
import sys


def solve(N, A):
    odds = [a for a in A if a%2]
    if len(odds) % 2:
        return 'NO'
    return 'YES'


def main(args):
    N = int(input())
    A = [int(a) for a in input().split()]
    ans = solve(N, A)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

Submission status: Accepted

Solution code:
num_ints = int(input())
sum_ints = sum([int(i) for i in input().split()])

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

Submission status: Accepted

Solution code:
def A():
    N = int(input())
    a = list(map(int, input().split()))
    aa = [e % 2 for e in a]
    odd = sum(aa)
    if odd % 2 == 0:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    A()

Submission status: Accepted

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

odd = 0
for a in A:
    if a % 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()))

odd = 0
for a in A:
	if a % 2:
		odd += 1
print(["YES", "NO"][not(odd % 2 == 0)])

Submission status: Accepted

Solution code:
# 2019/06/02
# AtCoder Grand Contest 010 - A

# For the answer:
# Count odd or even
# odd count is odd(&evenccnt >= 1): yes

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

# Count odd or even
oddcnt = 0
evencnt = 0
for i in range(n):
    if a[i] % 2 == 1:
        oddcnt += 1
    else:
        evencnt += 1

if evencnt >= 1:
    oddcnt += 1
    if oddcnt % 2 == 1:
        ans = "YES"
    else:
        ans = "NO"
else: 
    if oddcnt % 2 == 0:
        ans = "YES"
    else:
        ans = "NO"

# Output
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()

odd_cnt = len([True for a in map(int, input().split()) if a%2 == 1])

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

Submission status: Accepted

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

odd_cnt = len([True for a in A if a%2 == 1])

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(int,input().split()))
count = 0
for i in s:
  if i % 2 == 1:
    count += 1
  else:
    continue

if count % 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("NO" if sum(map(int, input().split())) % 2 else "YES")

Submission status: Accepted

Solution code:
from sys import exit, stdin
N = [int(_) for _ in stdin.readline().rstrip().split()]
A = []
no, ne = 0, 0
for i in stdin.readline().rstrip().split():
    if int(i) % 2 == 0:
        A.append('e')
        ne += 1
    else:
        A.append('o')
        no += 1
len_A = len(A)
if len_A % 2 == 0:
    if ne % 2 == 0:
        print('YES')
    else:
        print('NO')
else:
    if ne % 2 == 0:
        print('NO')
    else:
        print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
L = list(map(int, input().split()))
cnt = 0
for i in range(N):
    if L[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()))
Even = []
Odd = []
A.sort()
for a in A:
    if a % 2 == 0:
        Even.append(a)
    if a % 2 == 1:
        Odd.append(a)
if len(Odd) % 2 == 1:
    print('NO')
else:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
#以下てんぷら
def j(q):
    if q==1: print("YES")
    elif q == 0:print("NO")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


n = ip()                                     #入力整数1つ
#a,b,c,k= (int(i) for i in input().split())       #入力整数横2つ以上
a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しに4 3sum変数使用はsum関数使用できないので注意
ct = 0
if n==1:j(1)
for i in range(n):
    if a[i]%2:ct+=1
if ct%2:j(0)
j(1)

Submission status: Accepted

Solution code:
N = int(input())
odd_count = 0
for num in input().split():
    if int(num) % 2 != 0:
        odd_count += 1
if odd_count % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(lambda x: int(x)%2, input().split()))
if A.count(1)%2==0 or 0 not in A:
	print('YES')
else:
	print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#   できる操作は２つ
#       偶数を２つ減らして偶数を１つ増やす
#       奇数を２つ減らして偶数を１つ増やす

#   つまり、奇数は操作２によってしか減らせない
#   減らせる数は偶数個である

#   操作は１回以上行われる必要がある
#   つまり、最終的な数列は偶数１つ（奇数は０つ）

#   奇数が偶数個であることが必要十分条件

N = int(input())
A = map(lambda x:int(x)%2,input().split(" "))
print(['YES','NO'][sum(A)%2])

Submission status: Accepted

Solution code:

def main():
    n = int(input())
    a = list(map(int, input().split()))
    cont = 0

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
As = [int(elm) for elm in input().split(" ")]

s = sum(As)
out = "NO" if s % 2 == 1  else "YES"
print(out)

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==1:
        odd+=1
if odd==0 or odd%2==0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len([a for a in A if a % 2 == 1]) % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

#e,e->e
#o,o->e
#e,o->o : oddの個数の保存

#oddを消すことを考える
#oddが偶数個なら簡単に消せる
#oddが奇数個なら, どんなに頑張っても消えなくね


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

Submission status: Accepted

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

odd = 0
for a in A:
    if a % 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()))
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()))

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

Submission status: Accepted

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

even = 0
odd = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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))

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 == 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()))
odd = [a for a in A if a%2]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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