#include #include using namespace std; int main() { int N, M; cin >> N >> M; vector deg(N, 0); for (int i = 0; i < M; i++) { int a, b; cin >> a >> b; deg[a]++; deg[b]++; } int cnt = 0; for (int i = 0; i < N; i++) { cnt += deg[i] & 1; } if (cnt <= 2) cout << "YES" << endl; else cout << "NO" << endl; return 0; }