#include #include #include #include #include using namespace std; int ct[500],n,m,st; bool vis[500]; vector G[500]; int main() { cin >> n >> m; memset(vis, true, sizeof(vis)); for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; vis[a] = false; vis[b]=false; st = a; G[a].push_back(b); G[b].push_back(a); ct[a]++; ct[b]++; } int oct = 0; for (int i = 0; i < n; i++) { if (ct[i] % 2 == 1)oct++; } queue q; q.push(st); vis[st] = true; while (!q.empty()) { int ci = q.front(); q.pop(); for (int i = 0; i < G[ci].size(); i++) { if (vis[G[ci][i]])continue; vis[G[ci][i]] = true; q.push(G[ci][i]); } } for (int i = 0; i < n; i++) { if (!vis[i])oct = 100; } if (oct == 0 || oct == 2)cout << "YES" << endl; else cout << "NO" << endl; return 0; }