#include #include using namespace std; vectorG[500]; int used[500],n,m,c; void dfs(int u) { used[u]=1; for(int i=0;i>n>>m; for(int i=0;i>a>>b; G[a].push_back(b); G[b].push_back(a); } dfs(0); for(int i=0;i0&&!used[i]) { cout<<"NO"<