#include namespace zawa { using i16 = std::int16_t; using i32 = std::int32_t; using i64 = std::int64_t; using i128 = __int128_t; using u8 = std::uint8_t; using u16 = std::uint16_t; using u32 = std::uint32_t; using u64 = std::uint64_t; using usize = std::size_t; } // namespace zawa namespace zawa { void SetFastIO() { std::cin.tie(nullptr)->sync_with_stdio(false); } void SetPrecision(u32 dig) { std::cout << std::fixed << std::setprecision(dig); } } // namespace zawa using namespace zawa; int main() { SetFastIO(); int n, m; std::cin >> n >> m; int s, t, k; std::cin >> s >> t >> k; s--; t--; std::vector g(n, std::vector{}); for (int _{} ; _ < m ; _++) { int a, b; std::cin >> a >> b; a--; b--; g[a].emplace_back(b); g[b].emplace_back(a); } std::vector col(n, -1); auto dfs{[&](auto dfs, int v, int c) -> bool { col[v] = c; for (auto x : g[v]) { if (col[x] != -1 and c == col[x]) return false; if (col[x] == -1 and !dfs(dfs, x, c ^ 1)) return false; } return true; }}; const int INF{(int)1e9}; std::vector dist(n, INF); dist[s] = 0; std::queue que; que.emplace(s); while (que.size()) { auto v{que.front()}; que.pop(); for (auto x : g[v]) { if (dist[x] > dist[v] + 1) { dist[x] = dist[v] + 1; que.emplace(x); } } } assert(dfs(dfs, s, 0)); if (s == t) { if (k % 2) { std::cout << "No" << '\n'; } else if (n == 1) { std::cout << "No" << '\n'; } else if (g[s].size()) { std::cout << "Yes" << '\n'; } else { std::cout << "Unknown" << '\n'; } } else if (col[t] == 0) { assert(false); if (k % 2) { std::cout << "No" << '\n'; } else if (dist[t] <= k) { std::cout << "Yes" << '\n'; } else { std::cout << "Unknown" << '\n'; } } else if (col[t] == 1) { assert(false); if (!(k % 2)) { std::cout << "No" << '\n'; return 0; } else if (dist[t] <= k) { std::cout << "Yes" << '\n'; } else { std::cout << "Unknown" << '\n'; } } else { assert(false); assert(n >= 2); if (n == 2) { std::cout << (k % 2 ? "Yes" : "No") << '\n'; } else { std::cout << "Unknown" << '\n'; } } }