main = getLine >> interact (f 0 0 0 . map ((`mod` 4) . read) . words)
 
f x y z []
  | y + 2 > x + t = "Yes"
  | otherwise = "No"
    where t = if z > 0 then 1 else 0
f x y z (0:as) = f x (succ y) z as
f x y z (2:as) = f x y (succ z) as
f x y z (_:as) = f (succ x) y z as