-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

import qualified Data.Map as Map
import qualified Data.Set as Set

main = putStrLn . solve . lines =<< getContents

solve (hw:xs) = if ans then "Yes" else "No" where
    f m c = Map.insertWith (+) c 1 m
    chs = Map.elems
        $ Map.map (`mod` 4)
        $ foldl (foldl f) Map.empty xs
    [h, w] = map read $ words hw
    ans | even h && even w = all (== 0) chs
        | even h || even w = all even chs
        | otherwise = (== 1) $ length $ filter odd chs 
