#include #include #include #include using namespace std; int N,M; vectorG[2<<17]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int s,t,k; cin>>N>>M>>s>>t>>k; s--,t--; for(int i=0;i>a>>b; a--,b--; G[a].push_back(b); G[b].push_back(a); } if(s==t) { if(N==1||k%2==1)cout<<"No\n"; else { if(!G[s].empty())cout<<"Yes\n"; else cout<<"Unknown\n"; } return 0; } queueQ; Q.push(s); vectordist(N,(int)1e9); dist[s]=0; while(!Q.empty()) { int u=Q.front();Q.pop(); for(int v:G[u]) { if(dist[v]>dist[u]+1) { dist[v]=dist[u]+1; Q.push(v); } } } if(dist[t]==(int)1e9) { if(k%2==1)cout<<"Unknown\n"; else { if(N>=3)cout<<"Unknown\n"; else cout<<"No\n"; } } else if(dist[t]%2==1) { if(k%2==0)cout<<"No\n"; else { if(dist[t]<=k)cout<<"Yes\n"; else cout<<"Unknown\n"; } } else { if(k%2==1)cout<<"No\n"; else { if(dist[t]<=k)cout<<"Yes\n"; else cout<<"Unknown\n"; } } }