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 = int(input())
A = [int(n) for n 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')

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

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

Odd = 0
Even = 0

for i in a:
    if i%2 == 1:
        Odd +=1
    elif i%2 ==0:
        Even +=1

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

Solution (Python):
import sys

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

Solution (Python):
import numpy as np

N = raw_input()
s = map(int,raw_input().split(" "))

s = np.array(s)
a = len(s[s%2 == 1])
b = len(s[s%2 == 0])


if a%2==0 and b%2==0:
    print "YES"
elif a%2 == 0 and b%2 ==1:
    print "YES"
elif a%2==1 and b%2==0:
    print "NO"
elif a%2==1 and b%2 ==1:
    print "NO"

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

def get_even_idx(a):
    try_idx = random.randint(0,a.len()-1)
    while a[try_idx] % 2 != 0:
        
        try_idx = random.randint(0,a.len()-1)
    return try_idx

def get_odd_idx(a):
    try_idx = random.randint(0,a.len()-1)
    while a[try_idx] % 2 == 0:
        
        try_idx = random.randint(0,a.len()-1)
    return try_idx

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

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

select(a)

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

Solution (Python):
def even(num):
    if num & 1:
        return('uneven')
    else:
        return('even')

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

n = 0
for a in A:
    if even(a) == 'uneven':
        n += 1

if even(n) == 'even':
    print('YES')
else:
    print('NO')

Solution (Python):
def solve(As):
    n_odd = 0
    for A in As:
        if A % 2 == 1:
            n_odd += 1
    
    if n_odd % 2 == 0:
        return 'YES'
    else:
        return 'NO'


def main():
    N = input()
    As = map(int, raw_input().split())
    print solve(As)

main()

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

def solve():
    n = 0
    for a in A:
        if a % 2 == 1:
            n += 1

    if n % 2 == 0:
        return True
    return False

if solve():
    print('YES')
else:
    print('NO')

Solution (Python):



def readln(ch):
    _res = list(map(int,str(input()).split(ch)))
    return _res

n = int(input())
a = readln(' ')
ans = 0
for x in a:
    if x % 2 == 1:
        ans = ans + 1
if ans % 2 == 0:
    print('YES')
else:
    print('NO')

Solution (Python):



def judge(n, xs):
    o0 = sum(x % 2 for x in xs)
    e0 = n - o0
    o = o0 % 2
    e = o0 // 2 + e0 // 2 + e0 % 2
    while e > 1:
        d, m = divmod(e, 2)
        e = d + m
    rest = o + e
    return rest == 1


def main():
    n = int(input())
    xs = [int(x) for x in input().split()]
    print("YES" if judge(n, xs) else "NO")


if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())
l = input().split()
i = 0
k = 0
while i < n:
   k += int(l[i])
   i = i +1
if int(k/2)*2 == k:
   print("YES")
else:
   print("NO")

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

odds = []
evens = []
for a in A:
    if a%2 == 0:
        evens.append(a)
    else:
        odds.append(a)

num_evens = len(evens)
num_odds = len(odds)

if num_odds%2 == 0:
    num_evens += num_odds/2
    num_odds = 0
    print('YES')
else:
    num_evens += (num_odds-1)/2
    num_odds = 1
    print('NO')

Solution (Python):
if __name__=="__main__":
    raw_input()
    A=map(int,raw_input().split())

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

Solution (Python):
import sys

next(sys.stdin)
ns = list(map(int, next(sys.stdin).split()))

if len(ns) == 1:
    print('YES')
    exit()

if sum(1 for n in ns if n % 2 == 1) % 2 == 0:
    print('YES')
else:
    print('NO')

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


if __name__=="__main__":
    solve()

Solution (Python):
n = int(raw_input())
a = map(int, raw_input().split())
o = sum(x % 2 for x in a)
e = n - o
if n == 2:
    print "NO" if o == e else "YES"
else:
    print "NO" if o % 2 else "YES"

Solution (Python):
n = int(raw_input())
a = [int(x) for x in raw_input().split()]

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

print "NO" if m % 2 == 1 else "YES"

Solution (Python):


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

nb_even = len(list(filter(lambda x: x % 2 == 0, A)))
nb_odd = len(A) - nb_even


if nb_odd == 1:
    if nb_even == 0:
        print('YES')
    else:
        print('NO')
else:
    if nb_odd % 2 == 0:
        print('YES')
    else:
        print('NO')

Solution (Python):
N=int(input())
A_list=input().split()


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

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

Solution (Python):

N = int(raw_input())
a = [int(i) for i in raw_input().split(' ') if int(i)%2 == 1]

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

Solution (Python):


N = int(input())
A = [int(n)%2 for n in input().split() ]
if sum(A)%2 == 1:
    print("NO")
else:
    print("YES")

Solution (Python):
if __name__=="__main__":
    length = int(input().replace("\n",""))
    numbers = list(map(int, input().replace("\n","").split(" ")))
    c_gusu = 0
    c_kisu = 0
    for number in numbers:
        if(number%2 == 0):
            c_gusu += 1
        else:
            c_kisu += 1
    if(c_kisu%2 == 0):
        print("YES")
    else:
        print("NO")

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

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

odd=0

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

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

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

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

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

Solution (Python):



import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        n = input()
        a = map(int, input().split())

        odds = len([e for e in a if e % 2 == 1])
        if odds % 2 == 0:
            print('YES')
        else:
            print('NO')
            
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

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

Solution (Python):
length = int(input())
target = [int(n) for n in input().split(" ")]
even,odd = 0,0
for l in range(length):
    if target[l] % 2 == 0:
        even += 1
    else:
        odd += 1
if odd % 2 == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
if __name__=="__main__":
    N = int(input())
    a = list(map(int,input().split()))

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

    answer = (odd % 2 == 0)

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

Solution (Python):
N = int(input())
aa = [int(a) for a in input().rstrip().split()]

n_even = len(list(filter(lambda a: a % 2 == 0, aa)))
n_odd = len(list(filter(lambda a: a % 2 == 1, aa)))

x = n_odd // 2
n_odd -= x*2
n_even += x

if n_even > 1:
    n_even = 1

if n_even == 0 or n_odd == 0:
    print('YES')
else:
    print('NO')

Solution (Python):



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

def solve():
    o = 0
    e = 0
    for a in A:
        if a % 2 == 0:
            e += 1
        else:
            o += 1

    t = o % 2
    e += o // 2
    t += (e > 0)
    if t > 1:
        return "NO"
    return "YES"

print(solve())

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

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

cnt = 0
for a in A:
    cnt += 1 if a & 1 == 1 else 0

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

Solution (Python):
N = int(input())
s = sum(map(int, input().split()))
if s & 1:
  print("NO")
else:
  print("YES")

Solution (Python):
n = input()
a = sum(map(int, raw_input().split())) & 1
print 'YES' if a == 0 else 'NO'

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

Solution (Python):
import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def solve():
    N = int(input())
    A = [int(i) for i in input().split()]

    num_ev = 0
    num_od = 0

    for a in A:
        if a % 2 == 0:
            num_ev += 1
        else:
            num_od += 1

    if num_od % 2 == 1:
        print('NO')
        return None
    else:
        num_ev += num_od // 2

        if num_ev >= 1:
            print('YES')
        else:
            print('NO')

if __name__ == '__main__':
    solve()

Solution (Python):
import numpy as np

N = int(input())
a = np.fromstring(input(), sep=' ', dtype=np.int)

print('YES' if np.sum(a & 1) & 1 == 0 else 'NO')

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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
    n = II()
    a = LI()
    d = [0]*2
    for c in a:
        d[c%2]+=1
    if d[1] % 2 == 0:
        return 'YES'
    return 'NO'


print(main())

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

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