#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i, m, n) for(int i=int(m);i> N >> M; vector dim(N,0); vector a(M),b(M); UnionFind u(N); REP(i,0,M){ cin >> a[i] >> b[i]; dim[a[i]]++; dim[b[i]]++; u.unite(a[i],b[i]); } REP(i,0,M){ REP(j,0,M){ if(i != j){ if(!u.same(a[i],a[j])){ cout << "NO" << endl; return 0; } } } } int cnt = 0; REP(i,0,N){ if(dim[i] % 2 == 1){ cnt++; } } if(cnt == 0 || cnt == 2){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }