#pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2") #include #define INF 1000000001LL #define LNF 1000000000000000001LL #define MOD 1000000007LL #define MAX 200001 #define long long long #define all(x) x.begin(),x.end() using namespace std; vector graph[MAX]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n,m; cin >> n >> m; int s,e,k; cin >> s >> e >> k; for(int i = 0; i> a >> b; graph[a].push_back(b); graph[b].push_back(a); } vector vis(n+1,-1); queue q; q.push(s); while(!q.empty()) { int x = q.front(); q.pop(); for(int y : graph[x]) { if(vis[y] == -1) { vis[y] = vis[x]+1; q.push(y); } } } if(n == 1) { cout << "No\n"; return 0; } if(vis[e] <= k) { if(vis[e] == -1) { if(n == 2 && k%2) { cout << "Unknown\n"; } else if(n == 2) { cout << "No\n"; } else cout << "Unknown\n"; } else if(vis[e]%2 == k%2) cout << "Yes\n"; else cout << "No\n"; } else { if(vis[e]%2 == k%2) cout << "Unknown\n"; else cout << "No\n"; } return 0; }