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

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

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

print(('YES' if int(g+b) % 4 == 0 else 'NO'))

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

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

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