ZhenlongDai/ACPR huggingface dataset:
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = map(int,input().split())
O = 0
E = 0

for i in A:
    if i % 2 == 1:
        O += 1
    else:
        E += 1
if O % 2 == 0:
    print("Yes")
else:
    print("No")

Failing test case input:
5
-1 5 -1 2 1

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = map(int,input().split())
O = 0
E = 0

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

Problem: p03807
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
a=list(map(int, input().split()))
odd=[]
even=[]
for i in range(len(a)):
    if(i%2==0):
        even.append(i)
    else:
        odd.append(i)
if(len(odd)%2==1):
    print('YES')
else:
    print('NO')

Failing test case input:
5
3 2 0 14 1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int, input().split()))
odd=[]
even=[]
for i in range(len(a)):
    if(a[i]%2==0):
        even.append(a[i])
    else:
        odd.append(a[i])
if(len(odd)%2==1):
    print('NO')
else:
    print('YES')

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int()
a = list(map(int, input().split(' ')))
sum = 0
for i in range(n):
    sum += a[i]
if sum % 2 == 0:
    print('YES')
else:
    print('NO')

Failing test case input:
3
-2 -1 2

Expected output:
NO


Actual output:
YES


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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input().split()
i=0
count=0
while i<0:
  if s[i]%2!=0:
    count+=1
if count%2==0:
  print("Yes")
else:
  print("No")

Failing test case input:
3
-3 4 -6

Expected output:
NO


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
odd = 0
even = 0
for i in a:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1

if odd % 2 == 1:
    print('NO')
elif (odd/2 + even) % 2 == 1:
    print('NO')
else:
    print('YES')

Failing test case input:
5
1 1 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
odd = 0
even = 0
for i in a:
    if i % 2 == 0:
        even += 1
    else:
        odd += 1

if odd % 2 == 1:
    print('NO')
else:
    print('YES')
Problem: p03807
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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")

Failing test case input:
3
1 2 7

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
*a, = map(int, input().split())
print("No" if len(list(filter(lambda x: x%2, a)))%2 else "Yes")


Failing test case input:
5
1 18 1 14 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
*a, = map(int, input().split())
print("NO" if len(list(filter(lambda x: x%2, a)))%2 else "YES")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
5
4 3 0 16 4

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 or odd==1:
    print("YES")
elif odd%2==0:
    print("YES")
else:
    print("NO")

    
    


Failing test case input:
5
3 4 0 14 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


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

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

if odd % 2 != 0:
    print("No")
    exit()
else:
    even += int(odd / 2)

if even % 2 != 0:
    print("No")
else:
    print("Yes")



Failing test case input:
3
-1 -2 -3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):


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

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

if odd % 2 != 0:
    print("NO")
else:
    print("YES")
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
hoge=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=hoge[i]%2
if(ans%2):
  print("YES")
else:
  print("NO")

Failing test case input:
5
1 1 2 8 2

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

if sum(1 for n in map(int, next(sys.stdin).split()) if n % 2 == 1) % 2 == 0:
    print('YES')
else:
    print('NO')


Failing test case input:
3
-1 -2 -3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5
2 3 -1 16 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = list(map(int,input().split()))
s = 0
for i in a:
    if i % 2 == 1:
        s += 1
if s % 2 == 0:
    print("Yes")
else:
    print("No")

Failing test case input:
5
-1 5 -1 2 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int,input().split()))
s = 0
for i in a:
    if i % 2 == 1:
        s += 1
if s % 2 == 0:
    print("YES")
else:
    print("NO")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

if 2 * len(evens) == len(odds):
    print('Yes')
else:
    print('No')

Failing test case input:
3
-2 -1 3

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

if len(odds) % 2 == 0:
    print('YES')
else:
    print('NO')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 % 2 != 0:
    ans = "NO"
else:
    even += odd
    while even > 1:
        even /= 2
    if even != 1:
        ans = "NO"
print(ans)


Failing test case input:
5
3 4 0 14 1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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)

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input();print('YNeos'[sum(int(i)%2for i in input().split())%2::2])

Failing test case input:
3
0 -1 14

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
input();print('YNEOS'[sum(int(i)%2for i in input().split())%2::2])

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
even = len(list(filter(lambda x: int(x) % 2, input().split())))
odd = N - even

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

print('NO' if odd == even == 1 else 'YES')


Failing test case input:
5
1 1 4 8 5

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
odd = len(list(filter(lambda x: int(x) % 2, input().split())))
even = N - odd

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

print('NO' if odd == even == 1 else 'YES')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = input().split()
a = [int(i) for i in a]

odds = len([i for i in a if i % 2 == 1])
evens = len([i for i in a if i % 2 == 0])

if odds % 2 == 1:
  print('NO')
elif (evens + odds / 2) % 2 == 1:
  print('NO')
else:
  print('YES')

Failing test case input:
3
0 0 14

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
a = input().split()
a = [int(i) for i in a]

odds = len([i for i in a if i % 2 == 1])
evens = len([i for i in a if i % 2 == 0])

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
arr=list(map(int,input().split()))
count=0
for i in range(n):
  if arr[0]%2==1:
    count+=1
if count%2==1:
  print('NO')
else:
  print('YES')

Failing test case input:
5
2 1 0 14 0

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
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')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(g,k)
print('YES'if g==[] or k==[] else 'NO')

Failing test case input:
5
0 4 -1 5 1

Expected output:
NO


Actual output:
[0] []
[4] []
[4] [-1]
[4, 4] []
[4, 4] [1]
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

Failing test case input:
3
0 -1 14

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 (p/2+q)%2 != 0:
        print('NO')
    else:
        print('YES')


Failing test case input:
5
2 18 0 14 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 od%2==0 and ev%2!=0:
    print('NO')
elif od%2!=0 and ev%2==0:
    print('NO')
else:
    print('YES')


Failing test case input:
5
2 18 0 14 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

if 2 * len(evens) == len(odds):
    print('YES')
else:
    print('NO')

Failing test case input:
5
4 3 -1 16 2

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

if len(odds) % 2 == 0:
    print('YES')
else:
    print('NO')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(sum([1 if i % 2 == 1 else 0 for i in list(map(int, input().split(' ')))]))

Failing test case input:
5
4 3 0 14 4

Expected output:
NO


Actual output:
1


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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

lO = A[::2]

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


Failing test case input:
5
1 1 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))

lO = [ i for i in A if i % 2 == 1 ]

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



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


Failing test case input:
3
-1 -1 -3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):



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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
5
0 2 -1 9 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):








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


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"


print(ans)


Failing test case input:
5
-1 5 -1 5 1

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):








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


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"


print(ans)
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

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

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

Failing test case input:
3
2 2 7

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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:
  if 1 <= even and 0 < odd:
    print('YES')
  else:
    print('NO')

Failing test case input:
5
4 6 0 14 0

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 == 1:
    print("YES")
else:
    print("NO")


Failing test case input:
3
-1 -2 -1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
od=0
for i in range(N):
    if A[i]%2==1:
        od+=1
if od%2==0:
    print("YES")
else:
    print("No")

Failing test case input:
3
0 0 -3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
od=0
for i in range(N):
    if A[i]%2==1:
        od+=1
if od%2==0:
    print("YES")
else:
    print("NO")

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
A = list(map(int,input().split()))

count_odd = sum([a%2==1 for a in A])
if count_odd%2==1 and count_odd>2:
  print('NO')
else:
  print('YES')

Failing test case input:
3
0 0 -3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int,input().split()))

count_odd = sum([a%2==1 for a in A])
if count_odd%2==1 and count_odd>=1:
  print('NO')
else:
  print('YES')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
Odds = list(filter(lambda x:x%2 == 1,A))
Odds_num = len(Odds)
if Odds_num % 2 == 1:
    print("No")
else:
    print("Yes")

Failing test case input:
5
0 4 -1 5 1

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
Odds = list(filter(lambda x:x%2 == 1,A))
Odds_num = len(Odds)
if Odds_num % 2 == 1:
    print("NO")
else:
    print("YES")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
*A, = map(int, input().split())

count = 0

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

if count%2==0:
    print("Yes")
else:
    print("No")

Failing test case input:
3
-1 -1 -3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
*A, = map(int, input().split())

count = 0

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

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
3
2 2 7

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == "__main__":
    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')


Failing test case input:
3
0 -2 -1

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
5
2 1 0 14 1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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")
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(j) for j in input().split()]

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

Failing test case input:
3
-2 2 -2

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(j) for j in input().split()]

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input()
a = list(map(int, input().split()))
if 1 & len([i for i in a if i&1]):
    print('No')
else:
    print('Yes')


Failing test case input:
5
2 2 0 14 1

Expected output:
NO


Actual output:
No


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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



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

    if o % 2 != 0:
        return "NO"
    e += o 
    if e % 2 != 0:
        return "NO"
    return "YES"

print(solve())




Failing test case input:
3
-1 -2 -1

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):



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 
    t += (e > 0)
    if t > 1:
        return "NO"
    return "YES"

print(solve())

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
3
2 2 7

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

print('Yes' if len([i for i in a if i%2==1])%2==0 else 'No')

Failing test case input:
5
0 2 -1 9 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):


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

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

lO = A[::2]
lE = A[1::2]

if len(lE) % 2 == 1 and len(lO) % 2 == 0:
  print("YES")
  
else:
  print("NO")

Failing test case input:
3
-1 -2 -2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))

lO = [ i for i in A if i % 2 == 1 ]

if len(lO) % 2 == 0:
  print("YES")
  
else:
  print("NO")
Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

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

if odds % 2 == 0:
  print("Yes")
else:
  print("No")

Failing test case input:
3
-2 -1 4

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))


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

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
  print("Yes")
else:
  print("No")

Failing test case input:
5
4 3 -1 16 4

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
  print("YES")
else:
  print("NO")

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a_l = list(map(int, input().split()))
g = sum([ 1 for i in a_l if i%2 == 0])
k = n - g

ans = 'NO'
if k % 2 == 0:
    if (k/2 + g) % 2 == 0:
        ans = 'YES'
print(ans)

Failing test case input:
5
1 1 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
a_l = list(map(int, input().split()))
k = len([ i for i in a_l if i%2 != 0])
ans = 'NO'
if k % 2 == 0:
    ans = 'YES'
print(ans)

Problem: p03807
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
if sum(a) % 2 == 0:
    print("Yes")
else:
    print("No")

Failing test case input:
3
0 -2 -1

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
if sum(a) % 2 == 0:
    print("YES")
else:
    print("NO")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,*a=map(int,open(0).read().split());print("YNeos"[sum(map(lambda x:x%2, a))%2::2])

Failing test case input:
3
-2 3 -6

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n,*a=map(int,open(0).read().split());print("YNEOS"[sum(map(lambda x:x%2, a))%2::2])

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5
3 3 0 14 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
3
-1 1 -6

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
L = list(map(int,input().split()))
cnt = 0
for i in range(n):
  if L[i]%2 == 1:
    cnt += 1
if cnt%2 == 1:
  print("YES")
else:
  print("NO")

Failing test case input:
3
-2 -1 4

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
L = list(map(int,input().split()))
cnt = 0
for i in range(n):
  if L[i]%2 == 1:
    cnt += 1
if cnt%2 == 1:
  print("NO")
else:
  print("YES")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
od=0
for i in range(N):
    if A[i]%2==1:
        od+=1
print(od)
if od%2==0:
    print("YES")
else:
    print("NO")

Failing test case input:
3
-2 3 -2

Expected output:
NO


Actual output:
1
NO


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
od=0
for i in range(N):
    if A[i]%2==1:
        od+=1
if od%2==0:
    print("YES")
else:
    print("NO")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

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

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

Failing test case input:
3
0 -2 -1

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))

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

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
odd=0;even=0
for i in range(n):
    if a[i]%2==1:
        odd+=1
    else:
        even+=1

if odd%2==0:
    print('Yes')
else:
    print('No')

Failing test case input:
3
0 -2 -2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
odd=0;even=0
for i in range(n):
    if a[i]%2==1:
        odd+=1
    else:
        even+=1

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(filter(lambda x: int(x) % 2 == 1, input().split()))
print('Yes' if len(a) % 2 == 0 else 'No')

Failing test case input:
5
2 2 2 8 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = list(filter(lambda x: int(x) % 2 == 1, input().split()))
print('YES' if len(a) % 2 == 0 else 'NO')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5
0 4 -1 5 2

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
num_list = list(map(int, input().split()))
guki = len([i for i in num_list if i%2==1])
print('Yes' if guki%2==0 else 'No')

Failing test case input:
3
0 0 11

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
num_list = list(map(int, input().split()))
guki = len([i for i in num_list if i%2==1])
print('YES' if guki%2==0 else 'NO')

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))
L=[i for i in L if i%2==1]
if len(L)==1:
  print("NO")
else:
  print("YES")

Failing test case input:
5
1 1 4 8 5

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))
L=[i for i in L if i%2==1]
if len(L)%2==1:
  print("NO")
else:
  print("YES")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')




Failing test case input:
5
3 4 0 14 1

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
odd = 0
even = 0

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

if odd % 2 == 0:
    print('Yes')
else:
    print('No')

Failing test case input:
5
2 3 -1 16 4

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
odd = 0
even = 0

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

if odd % 2 == 0:
    print('YES')
else:
    print('NO')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
li = list(map(int,input().split()))

ans = 'No'

even = []
odd = []

for i in li:
  if i % 2 == 0:
    even.append(i)
  else:
    odd.append(i)

if len(odd) % 2 == 0:
  ans = 'Yes'
  
print(ans)

Failing test case input:
5
2 18 0 14 0

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
a=int(input())
li = list(map(int,input().split()))

ans = 'NO'

even = []
odd = []

for i in li:
  if i % 2 == 0:
    even.append(i)
  else:
    odd.append(i)

if len(odd) % 2 == 0:
  ans = 'YES'
  
print(ans)

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
5
8 3 0 14 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

if sum(map(int, input().split()))%2:
    print("No")
else:
    print("Yes")

Failing test case input:
5
1 12 0 14 0

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())

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

Problem: p03807
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split(" ")))
even = []
odd = []
for i in a:
    if i % 2 == 0:
        even.append(i)
    else:
        odd.append(i)

ans = "Yes"
if len(odd) % 2 == 1:
    ans = "No"
print(ans)

Failing test case input:
3
-2 2 -2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split(" ")))
even = []
odd = []
for i in a:
    if i % 2 == 0:
        even.append(i)
    else:
        odd.append(i)

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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
odd = len([i for i in a if i%2==1])
if odd%2 != 0:
    print('No')
else:
    print('Yes')


Failing test case input:
3
-1 1 -6

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
odd = len([i for i in a if i%2==1])
if odd%2 != 0:
    print('NO')
else:
    print('YES')
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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
    
if odd_count % 2 == 1:
    print("NO")

else:
    even_count += odd_count 
    if even_count % 2 == 1:
        print("NO")
    else:
        print("YES")

        

Failing test case input:
5
9 3 0 14 4

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):


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 
odd_count = odd_count % 2

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

Problem: p03807
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
odd = 0

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

ans = "NO"
if odd == 0:
    ans = "YES"

else:
    if odd == 1:
        ans = "YES"
    elif odd % 2 == 1:
        ans = "NO"
    else:
        ans = "YES"

print(ans)


Failing test case input:
3
-1 2 -6

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
odd = 0

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

ans = "NO"
if odd % 2 == 1:
    ans = "NO"
else:
    ans = "YES"

print(ans)

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(['NO', 'YES'][sum([1 if i % 2 == 1 else 0 for i in [int(input()) % 1] + list(map(int, input().split(' ')))]) % 2])

Failing test case input:
3
-1 -1 -3

Expected output:
NO


Actual output:
YES


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

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=[int(i) for i in input().split(' ')]
count=0
for a in A:
  if a%2!=0:
    count+=1
  print(count)
print('YES' if count%2==0 else 'NO')


Failing test case input:
3
-1 -1 -3

Expected output:
NO


Actual output:
1
2
3
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
m = [i%2 for i in l]
print("YNEOS"[l.count(1)%2==0::2])

Failing test case input:
3
-2 4 -6

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int,input().split()))
m = [i%2 for i in l]
print("YNEOS"[m.count(1)%2==1::2])
Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 % 2 != 0:
    ans = "NO"
else:
    while even > 1:
        even /= 2
    if even != 1:
        ans = "NO"
print(ans)


Failing test case input:
3
0 0 14

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
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)

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
_, *a = map(int, open(0).read().split())
odd = sum(not ai % 2 for ai in a) + 1
print('YNeos'[odd % 2::2])

Failing test case input:
5
0 2 -1 16 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
_, *a = map(int, open(0).read().split())
odd = sum(ai % 2 for ai in a)
print('YNEOS'[odd % 2::2])

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

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


Failing test case input:
5
2 1 2 8 2

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
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')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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
    
if odd_count % 2 == 1:
    if even_count % 2 == 0:
        print("YES")
    else:
        print("NO")

else:
    even_count += odd_count 
    if even_count % 2 == 1:
        print("NO")
    else:
        print("YES")



Failing test case input:
3
-1 -2 -6

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):


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 
odd_count = odd_count % 2

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

Problem: p03807
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = map(int, input().split())
A = [int(i) for i in input().split()]
oddCount = 0
for a in A:
    if a % 2:
        oddCount += 1
print("YES" if oddCount % 2 == 0 else "No")


Failing test case input:
3
-2 -1 2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = map(int, input().split())
A = [int(i) for i in input().split()]
oddCount = 0
for a in A:
    if a % 2:
        oddCount += 1
print("YES" if oddCount % 2 == 0 else "NO")
Problem: p02988
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
p=list( map(int, input().split()))
ans=0
for i in range(0,n-1):
    if (p[i-1]<p[i]<p[i+1]) or (p[i-1]>p[i]>p[i+1]):
        ans=ans+1
print(ans)

Failing test case input:
9
14 17 0 2 5 25 7 4 0

Expected output:
4


Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
p=list( map(int, input().split()))
ans=0
for i in range(1,n-1):
    if (p[i-1]<p[i]<p[i+1]) or (p[i-1]>p[i]>p[i+1]):
        ans=ans+1
print(ans)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input()
a=list(map(int,input().split()))
b=0
for i in range(1,len(a)-1):
  b+=a[i-1]<i and i<a[i+1]
  b+=a[i-1]>i and i>a[i+1]
print(b)

Failing test case input:
9
14 12 3 2 5 12 9 4 0

Expected output:
5


Actual output:
3


Fixed submission (verdict: Accepted):
input()
a=list(map(int,input().split()))
b=0
for i in range(1,len(a)-1):
  b+=a[i-1]<a[i] and a[i]<a[i+1]
  b+=a[i-1]>a[i] and a[i]>a[i+1]
print(b)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

count = 0

for i in range(n-2):
    num_id = i+1
    temp = [num_list[num_id-1], num_list[num_id], num_list[num_id+1]]
    list_sorted = sorted(temp, reverse=True)
    print(temp)
    if list_sorted[1] == num_list[num_id]:
        count += 1


print(count)


Failing test case input:
5
1 3 5 4 2

Expected output:
2

Actual output:
[1, 3, 5]
[3, 5, 4]
[5, 4, 2]
2


Fixed submission (verdict: Accepted):

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

count = 0

for i in range(n-2):
    num_id = i+1
    temp = [num_list[num_id-1], num_list[num_id], num_list[num_id+1]]
    list_sorted = sorted(temp, reverse=True)
    if list_sorted[1] == num_list[num_id]:
        count += 1


print(count)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
p=list(map(int,input().split()))

c=0
for i in range(n-1):
    if p[i-1]<=p[i]<=p[i+1] or p[i+1]<=p[i]<=p[i-1]:
        c+=1
print(c)


Failing test case input:
9
14 17 3 4 2 25 7 4 0

Expected output:
2


Actual output:
3


Fixed submission (verdict: Accepted):
n=int(input())
p=list(map(int,input().split()))

c=0
for i in range(1,n-1):
    if p[i-1]<=p[i]<=p[i+1] or p[i+1]<=p[i]<=p[i-1]:
        c+=1
print(c)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math
x =  [int(s) for s in input().split()]
sum = 0
for i in range(len(x)-2):
    center = x[i+1]
    three = [x[i], x[i+1], x[i+2]]
    if(x[i+1] == int(sorted(three)[1])):
        sum += 1
        
print(sum)

Failing test case input:
9
14 12 3 2 9 14 7 4 0

Expected output:
5


Actual output:
0


Fixed submission (verdict: Accepted):
import math
num = input()
x =  [int(s) for s in input().split()]
sum = 0
for i in range(len(x)-2):
    center = x[i+1]
    three = [x[i], x[i+1], x[i+2]]
    if(x[i+1] == int(sorted(three)[1])):
        sum += 1
        
print(sum)
Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p = list(map(int,input().split()))
res = 0
for i, num in enumerate(p):
	if(1 <= i and i <= (len(p) - 2)):
		li = [p[i-1],p[i],p[i + 1]]
		li.sort()
		if((p[i-1] != p[i]) and (p[i] != p[i + 1]) and (li[1] == p[i])):
			res = res + 1
print(res)

Failing test case input:
9
14 12 3 2 5 6 7 4 0

Expected output:
5


Actual output:
0


Fixed submission (verdict: Accepted):
n = input()
p = list(map(int,input().split()))
res = 0
for i, num in enumerate(p):
	if(1 <= i and i <= (len(p) - 2)):
		li = [p[i-1],p[i],p[i + 1]]
		li.sort()
		if((p[i-1] != p[i + 1]) and (p[i-1] != p[i]) and (p[i] != p[i + 1]) and (li[1] == p[i])):
			res = res + 1
print(res)

Problem: p02988
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(1,n-1):
  print(p[i-1], p[i], p[i+1])
  if (p[i] > p[i-1]) and (p[i] < p[i+1]): cnt += 1
  if (p[i] < p[i-1]) and (p[i] > p[i+1]): cnt += 1
print(cnt)

Failing test case input:
9
14 18 0 2 5 14 11 4 -1

Expected output:
4


Actual output:
14 18 0
18 0 2
0 2 5
2 5 14
5 14 11
14 11 4
11 4 -1
4


Fixed submission (verdict: Accepted):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(1,n-1):
  if (p[i] > p[i-1]) and (p[i] < p[i+1]): cnt += 1
  if (p[i] < p[i-1]) and (p[i] > p[i+1]): cnt += 1
print(cnt)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
p = [i for i in input().split()]
ans = 0
for i in range(1,n-1):
  if p[i] != max(p[i-1:i+2]) and p[i] != min(p[i-1:i+2]):
    ans += 1
print(ans)

Failing test case input:
9
14 6 3 2 5 14 9 4 0

Expected output:
5


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
p = [int(i) for i in input().split()]
ans = 0
for i in range(1,n-1):
  if p[i] != max(p[i-1:i+2]) and p[i] != min(p[i-1:i+2]):
    ans += 1
print(ans)

Problem: p02988
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
k = 0
a = input()

lista = input().split()

for c in range(1, len(lista)-1):

    if lista[c-1] >= lista[c] >= lista[c + 1] or lista[c - 1] <= lista[c] <= lista[c + 1]:
        k += 1

print(k)


Failing test case input:
9
25 6 3 0 5 25 7 4 2

Expected output:
5


Actual output:
2


Fixed submission (verdict: Accepted):
k = 0
a = input()

lista = input().split()

for c in range(1, len(lista)-1):

    if int(lista[c-1]) > int(lista[c]) > int(lista[c + 1]) or int(lista[c - 1]) < int(lista[c]) < int(lista[c + 1]):
        k += 1

print(k)