#include #include #include using namespace std; using pii = std::pair; int main(){ int n, m; cin >> n >> m; vector > G(n); vector deg(n, pii(0,0)); for(int i = 0; i < n; i++) deg[i] = pii(0, i); for(int i = 0; i < n; i++) { int x, y; cin >> x >> y; x--, y--; G[x].push_back(y); G[y].push_back(x); deg[x].first++; deg[y].first++; } sort(deg.begin(), deg.end()); int cnt = 0; while(deg[0].first == 1){ int v = deg[0].second; for(int i = 0; i < G[v].size(); i++) { int u = G[v][i]; deg[u].first--; if(deg[u].first == 0)deg[u].first = 1e9; } deg[v].first = 1e9; cnt = (cnt+1)&1; sort(deg.begin(), deg.end()); } if(cnt) cout << "Yes" << endl; else cout << "No" << endl; }