#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include using namespace std; using namespace atcoder; using ll=long long; void IO(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main(){ IO(); ll n,m; cin>>n>>m; vector> G(n); for(ll i=0;i>a>>b; a--; b--; G[a].push_back(b); G[b].push_back(a); } bool ok=true; vector co(n,-1); for(ll i=0;i que; que.push(i); while(que.size()){ ll q=que.front(); que.pop(); for(ll u:G[q]){ if(co[u]==-1){ co[u]=(co[q]+1)%2; que.push(u); }else if(co[u]==co[q]){ ok=false; } } } } } if(ok){ cout<<"Yes"<