N, M = map(int, input().split()) S = [True for _ in range(N)] for _ in range(M): a, b = map(int, input().split()) S[a] = not(S[a]) S[b] = not(S[b]) count = 0 for s in S: if not s: count += 1 print('YES' if count <= 2 else 'NO')