#include using namespace std; struct I{I(){ios::sync_with_stdio(false);cin.tie(0);}}init; typedef vector V; typedef vector Graph; int main(){ int N,M; cin>>N>>M; vector A(M),B(M); for(int i=0;i>A[i]>>B[i]; Graph g(N); for(int i=0;i near(N,false); for(auto &v:g[0])near[v]=true; vector> V(N); for(int i=0;i0) for(auto &s:V[x]) for(auto &t:V[y]) if(s!=t&&s!=y&&t!=x){ cout<<"YES"<