#include using namespace std; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, m, s, t, k; cin >> n >> m >> s >> t >> k; s--, t--; vector> g(n); queue que; vector dp(n, 1 << 30); for(int i = 0; i < m; i++){ int u, v; cin >> u >> v; u--, v--; g[u].emplace_back(v); g[v].emplace_back(u); } que.emplace(s); dp[s] = 0; while(!que.empty()){ int v = que.front(); que.pop(); for(auto &&u : g[v]){ if(dp[v] + 1 >= dp[u]) continue; dp[u] = dp[v] + 1; que.emplace(u); } } if(n == 1){ cout << "No\n"; return 0; } if(dp[t] == (1 << 30)){ if(n == 2){ cout << (k % 2 == (s != t) ? "Unknown" : "No") << '\n'; return 0; } cout << "Unknown" << '\n'; return 0; } if(abs(dp[t] - k) & 1){ cout << "No\n"; return 0; } cout << "No\n"; return 0; cout << (dp[t] <= k ? "Yes" : "Unknown") << '\n'; }