/** * author: t9unkubj * created: 2024-03-15 */ #include #ifdef t9unkubj #define _GLIBCXX_DEBUG #define dbg(x) cout<<__LINE__<<" "<<#x<<":="< //using namespace atcoder; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,m; cin>>n>>m; int s,t,k; cin>>s>>t>>k; s--,t--; vector>g(n); for(int i=0;i>a>>b; a--,b--; g[a].push_back(b); g[b].push_back(a); } int INF=2e9; vectormd(n,INF); queueque; md[s]=0; que.push(s); while(que.size()){ auto p=que.front();que.pop(); for(auto x:g[p]){ if(md[x]>md[p]+1)md[x]=md[p]+1,que.push(x); } } if(md[t]!=INF){ if((md[t]%2)!=(k%2)){ cout<<"No"<