qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
sys.setrecursionlimit(int(pow(10,6)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None)

n,p=l()
A=l()
o=e=0
for i in range(n):
    if(A[i]%2):
        o+=1
    else:
        e+=1
if(o):
    print(2**(n-1))
else:
    print(2**n)





# Fixed code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
sys.setrecursionlimit(int(pow(10,6)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
# @lru_cache(None)

n,p=l()
A=l()
o=e=0
for i in range(n):
    if(A[i]%2):
        o+=1
    else:
        e+=1
if(o):
    print(2**(n-1))
else:
    if(p):
        print(0)
    else:
        print(2**n)
# Buggy code:
n, p = map(int, input().split())
a = [1 if i%2==0 else 0 for i in map(int,input().split())]
sum_a = sum(a)

if p==0:
    print(n*(n-1)-sum_a*(n-sum_a))
else:
    print(sum_a*(n-sum_a))

# Fixed code:
n, p = map(int, input().split())
a = list(map(int, input().split()))
odd_count = sum([i % 2 == 1 for i in a])
if p == 0:
    if odd_count == 0:
        print(2**(n-odd_count))
    else:
        print((2**(n-odd_count)) * (2 ** (odd_count - 1)))
else:
    if odd_count == 0:
        print(0)
    else:
        print((2**(n-odd_count)) * (2 ** (odd_count - 1)))
# Buggy code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, P = mapint()
As = list(mapint())
bit = [a%2 for a in As]

pos = {}
pos[0] = 1
for i in range(1, N+1):
    pos[i] = pos[i-1]*i
dic = {}
dic[0] = 0
dic[1] = 0
for i in bit:
    dic[i] += 1

ans = 2**dic[0]
if P<1:
    if dic[1]<1:
        print(0)
        exit(0)
    else:
        ans*=dic[1]
        dic[1] -= 1
val = 0
for i in range(dic[1]//2+1):
    val += pos[dic[1]]//pos[i*2]//pos[dic[1]-i*2]
print(val*ans)

# Fixed code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, P = mapint()
As = list(mapint())
bit = [a%2 for a in As]

pos = {}
pos[0] = 1
for i in range(1, N+1):
    pos[i] = pos[i-1]*i
dic = {}
dic[0] = 0
dic[1] = 0
for i in bit:
    dic[i] += 1

ans = 2**dic[0]
if P==1:
    if dic[1]<1:
        print(0)
        exit(0)
    else:
        pass
        # ans*=dic[1]
        # dic[1] -= 1
val = 0
for i in range(dic[1]//2+1):
    val += pos[dic[1]]//pos[i*2]//pos[dic[1]-i*2]
print(val*ans)
# Buggy code:
from math import factorial
N,P=map(int,input().split())
a=list(map(int,input().split()))
odd=0
even=0
for i in range(N):
  if a[i]%2==0:
    even+=1
  else:
    odd+=1
ans=2**even
k=0
if P==0:
  k=odd//2 +1
else:
  k=(odd+1)//2
tmp=0
for i in range(1,k+1):
  tmp+=factorial(odd)//factorial(odd-i)//factorial(i)

print(ans*tmp)

# Fixed code:
from math import factorial
N,P=map(int,input().split())
a=list(map(int,input().split()))
odd=0
even=0
for i in range(N):
  if a[i]%2==0:
    even+=1
  else:
    odd+=1
ans=2**even
k=0
if P==0:
  k=0
else:
  k=1
tmp=0
for i in range(k,odd+1,2):
  tmp+=factorial(odd)//factorial(odd-i)//factorial(i)

print(ans*tmp)
# Buggy code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

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

    A = list(map(lambda x: x % 2, A))
    if A.count(1):
        ans = pow(2,N-1)
    else:
        if P == 0:
            ans = pow(2,N)
        else:
            ans = pow(2,N-1)

    print(ans)

if __name__ == '__main__':
    main()


# Fixed code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

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

    A = list(map(lambda x: x % 2, A))
    if A.count(1):
        ans = pow(2,N-1)
    else:
        if P == 0:
            ans = pow(2,N)
        else:
            ans = 0

    print(ans)

if __name__ == '__main__':
    main()
# Buggy code:
import collections
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def combi(a,b):
	num = 1
	for j in range(b):
		num = num*(a-j)//(j+1)
	return num

N,P = IL()
A = IL()

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

zero = 1
if even != 0:
	for i in range(1,even+1):
		zero += combi(even,i)
		print(zero)

if P == 1:
	ans = 0
	for i in range(1,odd+1,2):
		ans += combi(odd,i)*zero
else:
	ans = 0
	for i in range(0,odd+1,2):
		ans += combi(odd,i)*zero
		
print(ans)

# Fixed code:
import collections
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def combi(a,b):
	num = 1
	for j in range(b):
		num = num*(a-j)//(j+1)
	return num

N,P = IL()
A = IL()

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

zero = 1
if even != 0:
	for i in range(1,even+1):
		zero += combi(even,i)

if P == 1:
	ans = 0
	for i in range(1,odd+1,2):
		ans += combi(odd,i)*zero
else:
	ans = 0
	for i in range(0,odd+1,2):
		ans += combi(odd,i)*zero

print(ans)
# Buggy code:
import math
def combinations(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,p=map(int,input().split())
a=list(map(int,input().split()))
n0=0
n1=0
ans=0
for i in range(len(a)):
  if a[i]%2:
    a[i]=1
    n1+=1
  else:
    a[i]=0
    n0+=1
s=sum(a)
for i in range(0,s+1,2):
  ans+=combinations(n1,i)
print(ans*(2**n0))

# Fixed code:
import math
def combinations(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,p=map(int,input().split())
a=list(map(int,input().split()))
n0=0
n1=0
ans=0
for i in range(len(a)):
  if a[i]%2:
    a[i]=1
    n1+=1
  else:
    a[i]=0
    n0+=1
s=sum(a)
for i in range(0,s+1,2):
  ans+=combinations(n1,i)
  if p==1 and s==0:
    print(0)
    exit()
print(ans*(2**n0))
# Buggy code:
from operator import mul
from functools import reduce

n, p = map(int, input().split())

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

a_0 = []
a_1 = []
for j in a_list:
    if j % 2 == 0:
        a_0.append(j)
    else:
        a_1.append(j)

def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


if p == 0:
    ans = 1

    if len(a_0) >= 1:
        for i in range(1,len(a_0)+1):
            ans += combinations_count(len(a_0), i)
    
    if len(a_1) > 2:
        for i in range(2,len(a_1), 2):
            print(i)
            ans += combinations_count(len(a_1), i)
    elif len(a_1) == 2:
        ans += 1

elif p == 1:
    ans = 0

    tmp_2 = 1
    if len(a_0) >= 1:
        for i in range(1,len(a_0)+1):
            tmp_2 += combinations_count(len(a_0), i)
    #print(tmp_2)

    if len(a_1) >= 1:
        for i in range(1,len(a_1), 2):
            #print(i)
            tmp = combinations_count(len(a_1), i)
            ans += tmp*tmp_2

print(ans)


# Fixed code:
from operator import mul
from functools import reduce

n, p = map(int, input().split())

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

a_0 = []
a_1 = []
for j in a_list:
    if j % 2 == 0:
        a_0.append(j)
    else:
        a_1.append(j)

def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


if p == 0:
    ans = 1

    tmp_2 = 0
    if len(a_0) >= 1:
        for i in range(1,len(a_0)+1):
            tmp_2 += combinations_count(len(a_0), i)
    #print(tmp_2)
    ans += tmp_2
    
    tmp_1 = 0
    if len(a_1) > 2:
        for i in range(2,len(a_1)+1, 2):
            #print(i)
            tmp_1 += combinations_count(len(a_1), i)
    elif len(a_1) == 2:
        tmp_1 += 1
    ans += tmp_1
    #print(tmp_1)

    ans += tmp_1*tmp_2


elif p == 1:
    ans = 0

    tmp_2 = 1
    if len(a_0) >= 1:
        for i in range(1,len(a_0)+1):
            tmp_2 += combinations_count(len(a_0), i)
    #print(tmp_2)

    if len(a_1) >= 1:
        for i in range(1,len(a_1)+1, 2):
            #print(i)
            tmp = combinations_count(len(a_1), i)
            ans += tmp*tmp_2

print(ans)
# Buggy code:
import math
def AGC017C(a,f):
    p=0
    for i in range(f,a,2):
        p+=math.factorial(a)//math.factorial(a-i)//math.factorial(i)
    return p

n,p=map(int,input().split())
d={1:0,0:0}
a=list(map(int,input().split()))
for i in a:
    d[i%2]+=1
print(d)
print(AGC017C(2,0))
if p==0:
    print((2**d[0])*AGC017C(d[1]),0)
else:
    if d[1]==0:
        print(0)
    else:
        print((2**d[0])*(AGC017C(d[1],1)))

# Fixed code:
import math
def AGC017C(a,f):
    p=0
    for i in range(f,a+1,2):
        p+=math.factorial(a)//math.factorial(a-i)//math.factorial(i)
    return p

n,p=map(int,input().split())
d={1:0,0:0}
a=list(map(int,input().split()))
for i in a:
    d[i%2]+=1
if p==0:
    print((2**d[0])*AGC017C(d[1],0))
else:
    if d[1]==0:
        print(0)
    else:
        print((2**d[0])*(AGC017C(d[1],1)))
# Buggy code:
N,P = map(int,input().split())
A = list(map(int,input().split()))
ce = 0
co = 0
for i in range(N):
    if A[i]%2==0:
        ce += 1
    else:
        co += 1
n = (2**ce)*2**(co-1)
if P==0:
    print(n)
else:
    print(2**N-n)

# Fixed code:
N,P = map(int,input().split())
A = list(map(int,input().split()))
ce = 0
co = 0
for i in range(N):
    if A[i]%2==0:
        ce += 1
    else:
        co += 1
if co>0:
    n = (2**ce)*(2**(co-1))
else:
    n = 2**ce
if P==0:
    print(n)
else:
    print(2**N-n)
# Buggy code:
import math
N, P = map(int, input().split())
A = list(map(int, input().split()))
even = 0
odd = 0
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

oddcmb = 0
if P == 0:
    for i in range(odd)[::2]:
        # print(i)
        oddcmb += comb(odd, i)
    ans = 2**even*oddcmb
    # oddcmb = comb()
else:
    for i in range(1, odd)[::2]:
        # print(i)
        oddcmb += comb(odd, i)
    ans = 2**even*oddcmb

print(ans)

# Fixed code:
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

n = [0] * 2

for a in A:
    n[a % 2] += 1


if P == 1:
    ans = 0
    for i in range(1, n[1]+1, 2):
        ans += comb(n[1], i)
    ans *= 2 ** n[0]
else:
    ans = 0
    for i in range(0, n[1]+1, 2):
        if i == 0:
            ans += 1
        else:
            ans += comb(n[1], i)
    ans *= 2 ** n[0]
    #ans += 1

print(ans)
# Buggy code:
def solve():
  N, P = map(int, input().split())
  A = list(map(int, input().split()))
  zero,one = 0,0
  for i in range(N):
    if A[i]%2==0:
      zero += 1
    else:
      one += 1
  if P==1:
    ans = pow(2,N-1)
  else:
    ans = pow(2,N-1)
  return ans
print(solve())

# Fixed code:
def solve():
  N, P = map(int, input().split())
  A = list(map(int, input().split()))
  zero,one = 0,0
  for i in range(N):
    if A[i]%2==0:
      zero += 1
    else:
      one += 1
  ans = pow(2,N-1)
  if P==1 and one == 0:
    return 0
  if P==0 and one == 0:
    return pow(2,N)
  return ans
print(solve())
# Buggy code:
n, p = map(int, input().split())
ls = list(map(int, input().split()))

odd = 0
even = 0

for i in range(n):
    if ls[i] % 2 == 0:
        even += 1
    elif ls[i] % 2 == 1:
        odd += 1

if p == 0:
    print((2 ** even) * max(2 ** (odd - 1), 1))
elif p == 1:
    print((2 ** even) * max(2 ** (odd - 1) - 1, 0))

# Fixed code:
n, p = map(int, input().split())
ls = list(map(int, input().split()))

odd = 0
even = 0

for i in range(n):
    if ls[i] % 2 == 0:
        even += 1
    elif ls[i] % 2 == 1:
        odd += 1

if p == 0:
    print((2 ** even) * max(2 ** (odd - 1), 1))
elif p == 1:
    if odd == 0:
        print(0)
    else:
        print((2 ** even) * max((2 ** (odd - 1), 1)))
# Buggy code:
N,P = map(int,input().split())
A = list(map(int,input().split()))

odd = 0
for v in A:
    if  v % 2:
        odd += 1 
even = N-odd

ans = (2**even)*(2**(odd-1))

print(ans)

# Fixed code:
N,P = map(int,input().split())
A = list(map(int,input().split()))

odd = 0
for v in A:
    if  v % 2:
        odd += 1 
even = N-odd
if odd != 0:
    print((2**even)*int(2**(odd-1)))
else:
    if P == 0:
        print(2**N)
    else:
        print(0)
# Buggy code:
def nCr(n, r):
    ret = 1
    for i in range(1, n+1):
        ret *= i
    for i in range(1, r+1):
        ret //= i
    for i in range(1, n-r+1):
        ret //= i
    return ret

n, p = map(int, input().split())
a = map(int, input().split())
even, odd = 0, 0

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

c_even = 2**even
c_odd = 0

start = 1 if p else 0

while start <= odd:
    c_odd += nCr(odd, start)
    start += 2
print(c_even, c_odd)
print(c_even * c_odd)


# Fixed code:
def nCr(n, r):
    ret = 1
    for i in range(1, n+1):
        ret *= i
    for i in range(1, r+1):
        ret //= i
    for i in range(1, n-r+1):
        ret //= i
    return ret

n, p = map(int, input().split())
a = map(int, input().split())
even, odd = 0, 0

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

c_even = 2**even
c_odd = 0

start = 1 if p else 0

while start <= odd:
    c_odd += nCr(odd, start)
    start += 2

print(c_even * c_odd)
# Buggy code:
import math
N,P = map(int,input().split())
A = list(map(int,input().split()))

odd = []
even = []
ans = 0
for i in A:
  if (i % 2 == 1):
    odd.append(i)
  else:
    even.append(i)

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
if (P == 0):
  l_odd = len(odd)
  ans += 1
  num = 2
  while l_odd >= num:
    ans += combinations_count(l_odd, num)
    num += 2
  if (len(even)!=0):
    ans *= 2**len(even)
else:
  l_even = len(even)
  ans += 1
  num = 2
  while l_even >= num:
    ans += combinations_count(l_even, num)
    num += 2
  if (len(odd)!=0):
    ans *= 2**len(odd)
print(ans)
  

# Fixed code:
import math
N,P = map(int,input().split())
A = list(map(int,input().split()))

odd = []
even = []
ans = 0
for i in A:
  if (i % 2 == 1):
    odd.append(i)
  else:
    even.append(i)

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
if (P == 0):
  l_odd = len(odd)
  num = 0
  while l_odd >= num:
    ans += combinations_count(l_odd, num)
    num += 2
  if (len(even)!=0):
    ans *= 2**len(even)
else:
  l_odd = len(odd)
  num = 1
  while l_odd >= num:
    ans += combinations_count(l_odd, num)
    num += 2
  if (len(odd)!=0):
    ans *= 2**len(even)
print(ans)
# Buggy code:
N,P = map(int, input().split())
A = list(map(int, input().split()))
in_odd = False
for i in range(N):
    if A[i]%2:
        in_odd = True
        break
if not in_odd:
    if P == 0:
        print(0)
else:
    print(2**(N-1))

# Fixed code:
N,P = map(int, input().split())
A = list(map(int, input().split()))
in_odd = False
for i in range(N):
    if A[i]%2:
        in_odd = True
        break
if not in_odd:
    if P:
        print(0)
    else:
        print(2**N)
else:
    print(2**(N-1))
# Buggy code:
n,p=map(int,input().split())
l=list(map(lambda x:int(x)%2,input().split()))
a,b=0,0
for i in l:
  if l%2>0:
    a+=1
  else:
    b+=1
if a==0:
  if p==0:
    print(2**n)
  else:
    print(0)
else:
  print(2**(n-1))

# Fixed code:
n,p=map(int,input().split())
l=list(map(lambda x:int(x)%2,input().split()))
a,b=0,0
for i in l:
  if i>0:
    a+=1
  else:
    b+=1
if a==0:
  if p==0:
    print(2**n)
  else:
    print(0)
else:
  print(2**(n-1))
# Buggy code:
def resolve():
    '''
    code here
    '''
    N, P = [int(item) for item in input().split()]
    As = [int(item)%2 for item in input().split()]

    is_all_even = True
    for item in As:
        if item == 1:
            is_all_even = False
    res = 0
    if is_all_even:
        if P == 0:
            res = 2 ** N
        else:
            res = 0
    else:
        print(2**(N-1))

if __name__ == "__main__":
    resolve()


# Fixed code:
def resolve():
    '''
    code here
    '''
    N, P = [int(item) for item in input().split()]
    As = [int(item)%2 for item in input().split()]

    is_all_even = True
    for item in As:
        if item == 1:
            is_all_even = False
    
    res = 0
    if is_all_even:
        if P == 0:
            res = 2 ** N
        else:
            res = 0
    else:
        res = 2**(N-1)
    
    print(res)

if __name__ == "__main__":
    resolve()
# Buggy code:
input1 = list(map(int,input("").split(" ")))
A = list(map(int,input("").split(" ")))
N = input1[0]
P = input1[1]

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

result = 2**len(even) * 2**(len(odd)-1)
print(result)

# Fixed code:
input1 = list(map(int,input("").split(" ")))
A = list(map(int,input("").split(" ")))
N = input1[0]
P = input1[1]

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

if len(odd) == 0:
	if P == 0:
		result = 2**N
	else:
		result = 0
else:
	result = 2**len(even) * 2**(len(odd)-1)

print(result)
# Buggy code:
S=map(int,input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")

# Fixed code:
S=int(input().replace(" ",""))
if S%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
r,g,b=map(int,input().split()))
ans=100*r+10*g+b

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

# Fixed code:
r,g,b = map(int,input().split())
num = 100*r+10*g+b
if num%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
r,g,b=map(int,input().split())
print('YES' if 10*g+b%4==0 else 'NO')

# Fixed code:
r,g,b = map(int,input().split())
if (100*r+10*g+b) % 4 == 0 :
    print("YES")
else :
    print("NO")
# Buggy code:
r, b, g = map(int, input().split())
print(['NO', 'YES'][(10*b+g)%4 == 0]

# Fixed code:
r, g, b = map(int, input().split())
print(['NO', 'YES'][(10*g + b) % 4 == 0])
# Buggy code:
r,g,b = map(int,input().split())
n == r*100 + g*10 + b
if n % 4 = 0:
    print('YES')
else:
    print('NO')

# Fixed code:
r, g, b = map(int, input().split())
if (100 * r + 10 * g + b) % 4 == 0:
	print('YES')
else:
	print('NO')
# Buggy code:
r,g,b=map(int,input().split())
x=int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')
r,g,b=map(int,input().spklit())
x=int(r+g+b)
if x%4==0:
  print('YES')
else:
  print('NO')


# Fixed code:
r,g,b=input().split()
x=int(r+g+b)

if x%4==0:
  print('YES')
else:
  print('NO')
# Buggy code:
r, g, b = map(int(), input().split())

A = 100*r + 10*g + b

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

# Fixed code:
r,g,b=map(int,input().split())

s=100*r+10*g+b
if s%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
r,g,b = list(map(int,input().split()))
A=r*100+g*10+b

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

# Fixed code:
r,g,b = list(map(int,input().split()))
A=r*100+g*10+b

if A%4==0:
  print("YES")
else:
  print("NO")
# Buggy code:
r, g, b = map(int, input().split())

if r * g * b % 4 == 0:
    print('YES')
else:
    print('NO')


# Fixed code:
r,g,b=map(int,input().split())

if (g*10+b)%4==0:
    print('YES')
else:
    print('NO')
# Buggy code:

r,g,b = input().split()
r = int(r)
g = int(g)
b = int(b)

if (r * 100 + g * 10 * b) % 4 == 0:
    print("YES")
else:
    print("NO")


# Fixed code:
r,g,b = input().split()
r = int(r)
g = int(g)
b = int(b)

number = r * 100 + g * 10 + b

if number % 4 == 0:
    print("YES")
else:
    print("NO")
# Buggy code:
a, b, c = map(int, input().split())
if (100*r + 10*g + b)%4 == 0:
    print("YES")
else:
    print("NO")

# Fixed code:
r,g,b=map(int,input().split())

if (r*100+g*10+b)%4==0:
  print('YES')
else:
  print('NO')
# Buggy code:
r, g, b = map(int , input(),split())
rgb = r*100 + g*10 + b
if rgb % 4 == 0:
    print('YES')
else:
    print('NO')

# Fixed code:
r,g,b=map(int,input().split())
rgb=r*100+g*10+b
if rgb%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
#64a
r,g,b = map(int, input().split())

if (r*100+g*10*b)%4==0:
    print("YES")
else:
    print("NO")

# Fixed code:
#64a
r,g,b = map(int, input().split())

if (r*100+g*10+b)%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
r, g, b = map(int, input().split())
if (r*100+g*10+b)%4:
  print('N0')
else:
  print('YES')

# Fixed code:
r, g, b = map(int, input().split())
if (r*100+g*10+b)%4:
  print('NO')
else:
  print('YES')
# Buggy code:
r,g,b=map(int,input().split())
if 100*r+10*g+b%4==0:
    print("YES")
else:
    print("NO")


# Fixed code:
r, g, b = map(int, input().split())

num = r * 100 + g * 10 + b

if num % 4 == 0:
    print('YES')
else:
    print('NO')
# Buggy code:
r,g,b = map(str,input().split())
list_C = [r,g,b]
num = int(''.join(list_c))
if num%4 == 0:
  print('YES')
else:
  print('NO')

# Fixed code:
r,g,b = map(str,input().split())
list_C = [r,g,b]
num = int(''.join(list_C))
if num%4 == 0:
    print('YES')
else:
    print('NO')
# Buggy code:
r,g,b=input().split()
sum=100*r+10*g+b
if sum%4==0:
  print("YES")
else:
  print("NO")

# Fixed code:
r,g,b=input().split()
sum=100*r+10*g+b
if int(sum)%4==0:
    print("YES")
else:
    print("NO")
# Buggy code:
# -*- coding: utf-8 -*-
r,g,b = list(map(int, input().split()))
print('YES' if 10*(g + b)%4==0 else 'NO')

# Fixed code:
# -*- coding: utf-8 -*-
r,g,b = list(map(int, input().split()))
print('YES' if (10*g + b)%4==0 else 'NO')
# Buggy code:
r,g,b = map(int,input().split())
if r*g*b%4==0:
    print("YES")
else:
    print("NO")

# Fixed code:
r,g,b = map(int,input().split())
if (10*g+b)%4 ==0:
    print("YES")
else:
    print("NO")
# Buggy code:
r,g,b = input().split()
print('YES' if r+g+b%4==0 else 'NO')

# Fixed code:
r,g,b = input().split()
print("YES" if int(r+g+b) % 4 == 0 else "NO")
# Buggy code:
a,b,c=map(int,input().split())
print("NO" if 100*a+10*b+c%4 else "YES")

# Fixed code:
a, b, c = map(int,input().split())
if (a*100+b*10+c)%4==0:
  print('YES')
else:
  print('NO')
# Buggy code:
r,g,b=map(int,input().split())
if ((g+b)%4) == 0 :print('YES')
  else:print('NO')

# Fixed code:
r, b, g = input().split()
num = int(r + b + g)
if num % 4 == 0:
    print("YES")
else:
    print("NO")
# Buggy code:
r,g,b = map(int,open(0).read().split())

if r * 100 + g * 10 + b % 4:
    print("YES")
else:
    print("NO")

# Fixed code:
r,g,b = map(int,open(0).read().split())

if (r * 100 + g * 10 + b) % 4 == 0:
    print("YES")
else:
    print("NO")