print(('YNEOS'[int(input().replace(' ',''))%4>0::2]))
print(('YNEOS'[int(input()[::2])%4>0::2]))
print(("YNEOS"[int(input().replace(" ", "")) % 4 > 0 :: 2]))

print(("YNEOS"[int(input()[::2]) % 4 > 0 :: 2]))

-print(("YNEOS"[int(input().replace(" ", "")) % 4 > 0 :: 2])) +print(("YNEOS"[int(input()[::2]) % 4 > 0 :: 2]))