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



L=[0 for i in range(N+1)]

for i in range(M):

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

    L[a]+=1

    L[b]+=1

for _ in range(N+1):

    if L[_]%2==1:

        print("NO")

        exit()

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

L=[0 for i in range(N+1)]

for i in range(M):

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

    L[a]+=1

    L[b]+=1



for i in range(1,len(L)):

    if L[i]%2==1:

        print("NO")

        exit()

print("YES")
N, M = list(map(int, input().split()))
L = [0 for i in range(N + 1)]
for i in range(M):
    a, b = list(map(int, input().split()))
    L[a] += 1
    L[b] += 1
for _ in range(N + 1):
    if L[_] % 2 == 1:
        print("NO")
        exit()
print("YES")

N, M = list(map(int, input().split()))
L = [0 for i in range(N + 1)]
for i in range(M):
    a, b = list(map(int, input().split()))
    L[a] += 1
    L[b] += 1
for i in range(1, len(L)):
    if L[i] % 2 == 1:
        print("NO")
        exit()
print("YES")

-for _ in range(N + 1): -    if L[_] % 2 == 1: +for i in range(1, len(L)): +    if L[i] % 2 == 1: