#include using namespace std; int main(){ int n,m; cin>>n>>m; vectorfrom(m),to(m); unordered_set s; vectoradj; for(int i=0;i>from[i]>>to[i]; from[i]--;to[i]--; if(from[i]==0)adj.emplace_back(to[i]); if(to[i]==0)adj.emplace_back(from[i]); s.emplace(from[i]*100000+to[i]); s.emplace(to[i]*100000+from[i]); } for(int i=0;i0&&b>0)||(a>0&&c>0)||(b>0&&c>0)||(c>=2)){ cout<<"YES"<