#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b par,size,edge; void init(int n_){ n=n_; par.assign(n,-1); size.assign(n,1); edge.assign(n,0); for(int i=0;i G[MAX]; int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int N,M;cin>>N>>M; int s,t,K;cin>>s>>t>>K; s--;t--; if(N==1){ if(K==0) cout<<"Yes\n"; else cout<<"No\n"; return 0; } vector dis(N,INF); for(int i=0;i>a>>b;a--;b--; G[a].push_back(b); G[b].push_back(a); } queue Q; Q.push(s); dis[s]=0; while(!Q.empty()){ int u=Q.front();Q.pop(); for(int to:G[u]){ if(chmin(dis[to],dis[u]+1)) Q.push(to); } } if(dis[t]==INF){ cout<<"Unknown\n"; }else{ if(abs(dis[t]-K)&1){ cout<<"No\n"; }else{ if(dis[t]<=K) cout<<"Yes\n"; else cout<<"Unknown\n"; } } }