import sys

n, m = list(map(int, sys.stdin.readline().split(' ')))

a = [0] * (2 * m)

for i in range(m):

    a[2 * i], a[2 * i + 1] = list(map(int, sys.stdin.readline().split(' ')))

a.sort()

flag = False

tmp = 0

crr = 0

for i in range(2 * m):

    nxt = a[i]

    if crr == nxt:

        tmp += 1

    else:

        if tmp & 1:

            flag = True

            break

        tmp = 1

    crr = nxt

if not flag:

    print("YES")

else:

    print("NO")

import sys

n, m = list(map(int, sys.stdin.readline().split(' ')))

mlt = [0] * n

for i in range(m):

    b, c = list(map(int, sys.stdin.readline().split(' ')))

    b -= 1

    c -= 1

    mlt[b] += 1

    mlt[c] += 1

flag = False

for i in range(n):

    if mlt[i] & 1:

        flag = True

        break

if not flag:

    print("YES")

else:

    print("NO")

import sys

n, m = list(map(int, sys.stdin.readline().split(" ")))
a = [0] * (2 * m)
for i in range(m):
    a[2 * i], a[2 * i + 1] = list(map(int, sys.stdin.readline().split(" ")))
a.sort()
flag = False
tmp = 0
crr = 0
for i in range(2 * m):
    nxt = a[i]
    if crr == nxt:
        tmp += 1
    else:
        if tmp & 1:
            flag = True
            break
        tmp = 1
    crr = nxt
if not flag:
    print("YES")
else:
    print("NO")

import sys

n, m = list(map(int, sys.stdin.readline().split(" ")))
mlt = [0] * n
for i in range(m):
    b, c = list(map(int, sys.stdin.readline().split(" ")))
    b -= 1
    c -= 1
    mlt[b] += 1
    mlt[c] += 1
flag = False
for i in range(n):
    if mlt[i] & 1:
        flag = True
        break
if not flag:
    print("YES")
else:
    print("NO")

-a = [0] * (2 * m) +mlt = [0] * n -    a[2 * i], a[2 * i + 1] = list(map(int, sys.stdin.readline().split(" "))) -a.sort() +    b, c = list(map(int, sys.stdin.readline().split(" "))) +    b -= 1 +    c -= 1 +    mlt[b] += 1 +    mlt[c] += 1 -tmp = 0 -crr = 0 -for i in range(2 * m): -    nxt = a[i] -    if crr == nxt: -        tmp += 1 -    else: -        if tmp & 1: -            flag = True -            break -        tmp = 1 -    crr = nxt +for i in range(n): +    if mlt[i] & 1: +        flag = True +        break