#include using namespace std; using int64 = long long; using uint64 = unsigned long long; const int MAX_N = 510; int deg[MAX_N]; bool isVisited[MAX_N]; vector G[MAX_N]; void dfs(int v) { isVisited[v] = true; for (int to : G[v]) { if (!isVisited[to]) { dfs(to); } } } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, M; cin >> N >> M; int start = -1; vector deg(N, 0); for (int i = 0; i < M; i++) { int a, b; cin >> a >> b; G[a].push_back(b); deg[a]++; G[b].push_back(a); deg[b]++; start = a; } dfs(start); int oddCnt = 0; for (int i = 0; i < N; i++) { oddCnt += deg[i] & 1; if (oddCnt > 2 or (!isVisited[i] and (deg[i] > 0))) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }