Scanf.scanf "%d %d" (fun n m ->
    let hist = Array.make n 0 in
    for i = 1 to m do
        Scanf.scanf " %d %d" (fun a b ->
            hist.(a - 1) <- hist.(a - 1) lxor 1;
            hist.(b - 1) <- hist.(b - 1) lxor 1;
        )
    done;
    print_endline @@ if Array.fold_left (+) 0 hist = 0 then "YES" else "NO"
)