#include namespace { #pragma GCC diagnostic ignored "-Wunused-function" #include #pragma GCC diagnostic warning "-Wunused-function" using namespace std; using namespace atcoder; #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(i,n) for(int i = (int)(n) - 1; i >= 0; i--) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) template bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; } template bool chmin(T& a, const T& b) { if (b < a) { a = b; return true; } else return false; } using ll = long long; using P = pair; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; int solve() { int n, m; cin >> n >> m; int s, t, k; cin >> s >> t >> k; s--, t--; VVI to(n); rep(_, m) { int a, b; cin >> a >> b; a--, b--; to[a].emplace_back(b); to[b].emplace_back(a); } if (n == 1) return -1; VI dist(n, -1); dist[s] = 0; queue q; q.emplace(s); while (q.size()) { int u = q.front(); q.pop(); for (int v : to[u]) if (dist[v] == -1) { dist[v] = dist[u] + 1; q.emplace(v); } } if (s == t) { if (k % 2) return -1; if (to[s].empty()) return 0; return 1; } if (dist[t] == -1) { if (n == 2 && k % 2 == 0) return -1; return 0; } if (dist[t] % 2 != k % 2) return -1; if (dist[t] <= k) return 1; return 0; } } int main() { ios::sync_with_stdio(false); cin.tie(0); int res = solve(); cout << (res == 1 ? "Yes\n" : res == 0 ? "Unknown\n" : "No\n"); }