#include #include #include #include #include #include #include #include #include #include using namespace std; long long n,m,s,t,k,a,b; vectore[200000]; pair color[200000]; bool visited[200000]; bool length[200000]; void dfs(long long now, long long sta, long long col) { if(visited[now]) return; visited[now] = true; color[now] = {sta,col}; for(long long nxt:e[now]) { dfs(nxt, sta, col^1); } } int main() { cin >> n >> m >> s >> t >> k; for(long long i=0;i> a >> b; a--;b--; e[a].push_back(b); e[b].push_back(a); } for(long long i=0;i>idx_len; idx_len.push({s,0}); while(!idx_len.empty()) { auto [idx, len] = idx_len.front(); idx_len.pop(); if(length[idx]) continue; length[idx] = true; if(idx==t) dst = len; for(long long nxt:e[idx]) { idx_len.push({nxt, len+1}); } } if(dst<=k) { cout << "Yes" << endl; } else { cout << "Unknown" << endl; } } else { cout << "No" << endl; } } else { cout << "Unknown" << endl; } }