from itertools import accumulate



N, M, *ab = map(int, open(0).read().split())

acc = [0] * (N + 1)

for a, b in zip(*[iter(ab)] * 2):

    if a > b:

        a, b = b, a

    acc[a - 1] += 1

    acc[b - 1] -= 1

acc = list(accumulate(acc, initial=0))

print("NO") if any(a % 2 for a in acc) else print("YES")

N, M, *ab = map(int, open(0).read().split())

ans = [0] * N

for a, b in zip(*[iter(ab)] * 2):

    ans[a - 1] += 1

    ans[b - 1] -= 1

print("NO") if any(a % 2 for a in ans) else print("YES")

from itertools import accumulate

N, M, *ab = map(int, open(0).read().split())
acc = [0] * (N + 1)
for a, b in zip(*[iter(ab)] * 2):
    if a > b:
        a, b = b, a
    acc[a - 1] += 1
    acc[b - 1] -= 1
acc = list(accumulate(acc, initial=0))
print("NO") if any(a % 2 for a in acc) else print("YES")

N, M, *ab = map(int, open(0).read().split())
ans = [0] * N
for a, b in zip(*[iter(ab)] * 2):
    ans[a - 1] += 1
    ans[b - 1] -= 1
print("NO") if any(a % 2 for a in ans) else print("YES")

-from itertools import accumulate - -acc = [0] * (N + 1) +ans = [0] * N -    if a > b: -        a, b = b, a -    acc[a - 1] += 1 -    acc[b - 1] -= 1 -acc = list(accumulate(acc, initial=0)) -print("NO") if any(a % 2 for a in acc) else print("YES") +    ans[a - 1] += 1 +    ans[b - 1] -= 1 +print("NO") if any(a % 2 for a in ans) else print("YES")