#include using namespace std; #define rep(i, a, n) for(int i = a; i < n; i++) #define rrep(i, a, n) for(int i = a; i >= n; i--) #define ll long long #define pii pair #define pll pair // constexpr ll MOD = 1000000007; constexpr ll MOD = 998244353; constexpr int IINF = 1001001001; constexpr ll INF = 1LL<<60; template void chmax(t&a,u b){if(a void chmin(t&a,u b){if(b> n >> m; int s, t, k; cin >> s >> t >> k; s--, t--; vector> g(n); rep(i, 0, m){ int a, b; cin >> a >> b; a--, b--; g[a].push_back(b); g[b].push_back(a); } vector dist(n, -1); dist[s] = 0; queue que; que.push(s); while(!que.empty()){ int q = que.front(); que.pop(); for(auto nq: g[q]){ if(dist[nq] != -1) continue; dist[nq] = dist[q]+1; que.push(nq); } } int not_reach = 0, same_group = 0, diff_group = 0; rep(i, 0, n){ if(dist[i] == -1) not_reach++; else if(dist[s] == dist[i]) same_group++; else diff_group++; } if(dist[t] != -1){ if((dist[t]%2 == 0 && k%2 == 1) || (dist[t]%2 == 1 && k%2 == 0)){ cout << "No" << endl; return 0; } if(k < dist[t]) cout << "Unknown" << endl; else cout << "Yes" << endl; }else{ if(k%2 == 0){ if(n == 2 && m == 0) cout << "No" << endl; else cout << "Unknown" << endl; }else{ cout << "Unknown" << endl; } } return 0; }