N, M = gets.split.map &:to_i edges = [] $<.map{|s| a, b = s.split.map &:to_i edges << [a, b] } used = [false]*M f=->e{ return if used[e] used[e] = true edges[e].each{|a| M.times{|i| next if edges[i][0]!=a&&edges[i][1]!=a || used[i] f[i] } } } f[0] h=[0]*N edges.each{|a,b| h[a]^=1 h[b]^=1 } puts used.all? && h.sum<3 ? :YES : :NO