n , m = map(int, input().split())
t_list = [[int(x) for x in input().split()] for _ in range(m)]#[[1, 2], [2, 4], [3, 4], [3, 1], [1, 4]]
o_list = [o_l for t_l in t_list for o_l in t_l]#[1, 2, 2, 4, 3, 4, 3, 1, 1, 4]
c_list = [i for i in range(1, n + 1) if o_list.count(i) % 2 != 0]
len_c = len(c_list)
result = "YES" if len_c <= 2 else "NO"
print(result)