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



if (10 * g + b) % 4 == 0:

    print("YES")

else:

    print("NO")

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



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

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

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

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