n,m=list(map(int,input().split()))

l=[0]*(n+1)

for i in range(m):

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

    l[a]+=1

    l[s]+=1

for i in l:

    if i%2:print("NO");exit()

print("YES")
n,m=list(map(int,input().split()))

from collections import Counter as co



from itertools import chain

flatten=chain.from_iterable

print(("YES" if all(i%2==0 for i in list(co(flatten([list(map(int,input().split())) for i in range(m)])).values())) else "NO"))
n, m = list(map(int, input().split()))
l = [0] * (n + 1)
for i in range(m):
    a, s = list(map(int, input().split()))
    l[a] += 1
    l[s] += 1
for i in l:
    if i % 2:
        print("NO")
        exit()
print("YES")

n, m = list(map(int, input().split()))
from collections import Counter as co
from itertools import chain

flatten = chain.from_iterable
print(
    (
        "YES"
        if all(
            i % 2 == 0
            for i in list(
                co(
                    flatten([list(map(int, input().split())) for i in range(m)])
                ).values()
            )
        )
        else "NO"
    )
)

-l = [0] * (n + 1) -for i in range(m): -    a, s = list(map(int, input().split())) -    l[a] += 1 -    l[s] += 1 -for i in l: -    if i % 2: -        print("NO") -        exit() -print("YES") +from collections import Counter as co +from itertools import chain + +flatten = chain.from_iterable +print( +    ( +        "YES" +        if all( +            i % 2 == 0 +            for i in list( +                co( +                    flatten([list(map(int, input().split())) for i in range(m)]) +                ).values() +            ) +        ) +        else "NO" +    ) +)