import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  arr <- map (read::String -> Int) . words <$> getLine
  let num = foldl1 (\acc val -> acc * 10 + val) arr
  putStrLn $ if num `mod` 4 == 0 then "YES" else "NO"

