import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as BS
main=do
 [n,m]<-map read.words<$>getLine
 ab<-replicateM m (map BS.unpack.BS.words<$>BS.getLine)
 putStrLn(if (g "0" True (sort (foldr (++) [] ab))) then "YES" else "NO")
  where g _ b [] = b
        g a b (c:l) = if a==c then (g c (not b) l) else (b&&(g c False l))