import sys sys.setrecursionlimit(200050) def find(x): if P[x] == x: return x else: P[x] = find(P[x]) #経路圧縮 return P[x] # return find(P[x]) #経路圧縮なし def same(x,y): return find(x) == find(y) def unite(x,y): x = find(x) y = find(y) if x == y: return 0 if x > y: x,y = y,x P[y] = x def parents(): Ps = set() for i in range(N): a = find(i) if a not in Ps: Ps.add(a) return Ps N,M = map(int,input().split()) AB = [list(map(int,input().split())) for _ in range(M)] P = [i for i in range(N)] visited = [False] * N E = [[] for _ in range(N)] for a,b in AB: a -= 1; b -= 1 E[a].append(b) E[b].append(a) unite(a,b) Ps = parents() def dfs(u,p): for v in E[u]: if v != p: if v in dic: if (len(dic) - dic[v]) % 2 == 1: return True else: return False dic[v] = len(dic) visited[v] = True if dfs(v,u): return True dic.pop(v) #visited[v] = False return False for i in Ps: dic = {} dic[i] = 0 visited[i] = True if dfs(i,-1) == False: print("No") exit() print("Yes")