from collections import defaultdict N, M = map(int, input().split()) adj_dict = defaultdict(list) for _ in range(M): Sa_i, Sb_i = map(int, input().split()) adj_dict[Sa_i].append(Sb_i) adj_dict[Sb_i].append(Sa_i) degree_even, degree_odd = 0, 0 for node in adj_dict: d = len(adj_dict[node]) if d % 2 == 0: degree_even += 1 else: degree_odd += 1 if degree_odd == 0 or degree_odd == 2: print('YES') else: print('NO')