import java.util.Scanner

/**
 * Created by sonetsuyoshi on 2015/12/16.
 */

object Main extends App {
  val sc = new Scanner(System.in)
  val (n, m) = (sc.nextInt, sc.nextInt)

  val edges = for(i <- 0 until m) yield (sc.nextInt - 1, sc.nextInt - 1)

  val counts = new Array[Int](n)

  val exist = 0.until(n).exists(i => {
    val counts = new Array[Int](n)
    edges.foreach { case (x, y) => {
      counts(x) += 1
      counts(y) += 1
      if (!(x == i || y == i)) counts(i) += 1
      }
    }
    if(counts.forall(_ % 2 == 0)) true
    else false
  })
  if(exist) println("YES")
  else println("NO")
}
