#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int MAX_N = 5010; set E[MAX_N]; struct Node { int v; int cnt; Node(int v = -1, int cnt = -1) { this->v = v; this->cnt = cnt; } bool operator>(const Node &n) const { return cnt > n.cnt; } }; int main() { int N, M; cin >> N >> M; int a, b; for (int i = 0; i < M; ++i) { cin >> a >> b; E[a].insert(b); E[b].insert(a); } priority_queue , greater> pque; for (int i = 1; i <= N; ++i) { pque.push(Node(i, E[i].size())); } int cnt = 0; vector MIN_CNT(N + 1, 9999); while (not pque.empty()) { Node node = pque.top(); pque.pop(); if (node.cnt != 1) continue; if (MIN_CNT[node.v] < node.cnt) continue; ++cnt; int u = *E[node.v].begin(); E[node.v].erase(u); E[u].erase(node.v); MIN_CNT[u] = E[u].size(); pque.push(Node(u, E[u].size())); } if (cnt % 2 == 1) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }