#include #include #include #include #include #include #include #include #include #include using namespace std; int n,m,s,t,k,a,b; vectore[200000]; pair color[200000]; bool visited[200000]; bool length[200000]; void dfs(int now, int sta, int col) { if(visited[now]) return; visited[now] = true; color[now] = {sta,col}; for(int nxt:e[now]) { dfs(nxt, sta, col^1); } } int main() { cin >> n >> m >> s >> t >> k; for(int i=0;i> a >> b; a--;b--; e[a].push_back(b); e[b].push_back(a); } for(int 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(int 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; } }