N, M = list(map(int, input().split()))

paths = [tuple(map(int, input().split())) for _ in range(M)]

e_vals = [0]*(N+1)

for u, v in paths:

    if u > v: u, v = v, u

    e_vals[u] += 1; e_vals[v] -= 1;

for i in range(1, N+1):

    e_vals[i] += e_vals[i-1]

    if e_vals[i] % 2 == 1: print('NO'); break;

else: print('YES')
N, M = list(map(int, input().split()))

cnt = [True]*N

for _ in range(M):

    a, b = list(map(int, input().split()))

    cnt[a-1] = not cnt[a-1]; cnt[b-1] = not cnt[b-1];

print(('YES' if all(cnt) else 'NO'))
N, M = list(map(int, input().split()))
paths = [tuple(map(int, input().split())) for _ in range(M)]
e_vals = [0] * (N + 1)
for u, v in paths:
    if u > v:
        u, v = v, u
    e_vals[u] += 1
    e_vals[v] -= 1
for i in range(1, N + 1):
    e_vals[i] += e_vals[i - 1]
    if e_vals[i] % 2 == 1:
        print("NO")
        break
else:
    print("YES")

N, M = list(map(int, input().split()))
cnt = [True] * N
for _ in range(M):
    a, b = list(map(int, input().split()))
    cnt[a - 1] = not cnt[a - 1]
    cnt[b - 1] = not cnt[b - 1]
print(("YES" if all(cnt) else "NO"))

-paths = [tuple(map(int, input().split())) for _ in range(M)] -e_vals = [0] * (N + 1) -for u, v in paths: -    if u > v: -        u, v = v, u -    e_vals[u] += 1 -    e_vals[v] -= 1 -for i in range(1, N + 1): -    e_vals[i] += e_vals[i - 1] -    if e_vals[i] % 2 == 1: -        print("NO") -        break -else: -    print("YES") +cnt = [True] * N +for _ in range(M): +    a, b = list(map(int, input().split())) +    cnt[a - 1] = not cnt[a - 1] +    cnt[b - 1] = not cnt[b - 1] +print(("YES" if all(cnt) else "NO"))