#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; int n = 505; vector> train(n,vector()); vector seen(n,false); void dfs(int i,int p=-1){ seen[i] = true; for(int c:train[i]){ if(c==p) continue; if(seen[c]) continue; dfs(c,i); } } int main(){ int m; cin >> n >> m; vector station(n,false); int first = -1; rep(i,m){ int a,b; cin >> a >> b; train[a].push_back(b); train[b].push_back(a); station[a] = true; station[b] = true; first = a; } dfs(first); int odd = 0; rep(i,n){ if(station[i] && !seen[i]){ cout << "NO" << endl; return 0; } if((int)(train[i].size())%2 == 1) odd++; } if(odd <= 2) cout << "YES" << endl; else cout << "NO" << endl; return 0; }