#include using namespace std; int n, m; const int MAX = 510; vector G[MAX]; vector used(MAX); bool dfs(int now, int cnt){ if(cnt == m) return true; used[now] = true; for(int i = 0; i < G[now].size(); i++){ if(!used[G[now][i]]){ return dfs(G[now][i], cnt + 1); } } return false; } int main(){ cin.tie(0); ios::sync_with_stdio(false); cin >> n >> m; for(int i = 0; i < m; i++){ int a, b; cin >> a >> b; G[a].push_back(b); G[b].push_back(a); } if(dfs(0, 0)){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }