#44194: python


suyueh (suyueh)


# Read input values
n, m = map(int, input().split())
degrees = [0] * n

# Build the graph and count the degree of each vertex
for _ in range(m):
    u, v = map(int, input().split())
    degrees[u - 1] += 1
    degrees[v - 1] += 1

# Count vertices with an odd degree
odd_count = sum(1 for degree in degrees if degree % 2 != 0)

# Check Eulerian path conditions
if odd_count == 0 or odd_count == 2:
    print("YES")
else:
    print("NO")