from collections import defaultdict class UnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n def find(self, x):#xが属するグループの根を返す if self.parents[x] < 0: return x else: self.parents[x] = self.find(self.parents[x]) return self.parents[x] def union(self, x, y):#xのグループとyのグループを結合 x = self.find(x) y = self.find(y) if x == y: return if self.parents[x] > self.parents[y]: x, y = y, x self.parents[x] += self.parents[y] self.parents[y] = x def size(self, x):#xの属するグループの要素数を返す return -self.parents[self.find(x)] def same(self, x, y):#xとyが同じグループに属するかを返す return self.find(x) == self.find(y) def members(self, x):#xが属するグループの要素をリストで返す root = self.find(x) return [i for i in range(self.n) if self.find(i) == root] def roots(self):#すべての根の要素をリストで返す return [i for i, x in enumerate(self.parents) if x < 0] def group_count(self):#グループ数を返す return len(self.roots()) def all_group_members(self): group_members = defaultdict(list) for member in range(self.n): group_members[self.find(member)].append(member) return group_members def __str__(self): return '\n'.join(f'{r}: {m}' for r, m in self.all_group_members().items()) import sys sys.setrecursionlimit(10**9) import pypyjit pypyjit.set_param('max_unroll_recursion=-1') n,m=map(int,input().split()) G=[[] for i in range(n)] uf=UnionFind(n) heiro=set() for i in range(m): a,b=map(int,input().split()) a-=1 b-=1 G[a].append(b) G[b].append(a) if uf.same(a,b): heiro.add(a) heiro.add(b) else: uf.union(a,b) heiro2=list(heiro) cant=set() def dfs(now,pre,used): global cant if pre!=-1 and now in heiro: cant=cant|used return else: for nxt in G[now]: if nxt!=pre and (now,nxt) not in cant and (nxt,now) not in cant: dfs(nxt,now,used|{(now,nxt)}) for edge in heiro2: dfs(edge,-1,set()) can=m-len(cant) if can%2==1:print('Yes') else:print('No')