ll@n,@m,@k,y=0; rep(k){ ll@x--; y|=1<<x; } int@(u,v)--[m]; graph g; g.setEdge(n,m,u,v); rep(a,n){ set<pair<ll,ll>>s,t; s.insert({1<<a,a}); while(!s.empty()){ ll z=y; for(auto b:s){ ll e=b.second; z&=~(1<<e); rep[g.edge[e]](c,g.es[e]){ if(~b.first&1<<c){ t.insert({b.first|1<<c,c}); } } } if(!z){ wt("Yes"); exit(0); } s=t; t.clear(); } } wt("No");