#!/usr/bin/env lua

a = io.read("*line")
nlist = {}
j = 1

for i in a:gmatch"%S+" do
    nlist[j] = tonumber(i)
    j = j + 1
end

num = 100 * nlist[1] + 10 * nlist[2] + nlist[3]

if num % 4 == 0 then
        print("YES")
else
        print("NO")
end
