import collections def solve(N, M, data): count = collections.Counter() for d in data: count.update(d) oddcount = 0 for key, val in count.items(): if val % 2 == 1: oddcount += 1 return "YES" if oddcount <= 2 else "NO" if __name__ == '__main__': N, M = map(int, input().split()) d = [] for _ in range(0, M): d.append(list(map(int, input().split()))) print(solve(N, M, d))