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

A = 100*a + 10*b + c



if A % 4 == 0:

    print('YES')

else:

    print('NO')

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

rgb = 100*r+10*g+b

print(('YES' if rgb % 4 == 0 else 'NO'))

a, b, c = list(map(int, input().split()))
A = 100 * a + 10 * b + c
if A % 4 == 0:
    print("YES")
else:
    print("NO")

r, g, b = list(map(int, input().split()))
rgb = 100 * r + 10 * g + b
print(("YES" if rgb % 4 == 0 else "NO"))

-a, b, c = list(map(int, input().split())) -A = 100 * a + 10 * b + c -if A % 4 == 0: -    print("YES") -else: -    print("NO") +r, g, b = list(map(int, input().split())) +rgb = 100 * r + 10 * g + b +print(("YES" if rgb % 4 == 0 else "NO"))