#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>m; vector > G(n); for(int i=0;i>a>>b; a--;b--; G[a].emplace_back(b); G[b].emplace_back(a); } vector > vs(n); for(int v:G[0]){ for(int u:G[v]){ if(u!=0) vs[u].emplace(v); if(vs[u].size()>5u) vs[u].erase(vs[u].begin()); } } auto YES=[](){cout<<"YES"<