#include using namespace std; #define int long long int N,M,K,S,T; signed main(){ cin>>N>>M>>K>>S>>T; S--; T--; if(S > T) swap(S,T); bool flag = (K%2 == 1); bool L = false; vector> G(N); for(int i = 0; i < M; i++){ int a,b; cin>>a>>b; a--; b--; G[a].push_back(b); G[b].push_back(a); if(a == S && b == T) L = true; else if(a == T || b == T) flag = true; else if(a == S || b == S) flag = true; } if(flag){ cout << "Yes" << "\n"; return 0; } if(!L){ cout << "No" << "\n"; return 0; } int res = 1e18; vector dist(N); for(int a = 0; a < N; a++){ vector in(N); vector out(N); vector col(N,-1); queue Q; Q.push(a); col[a] = 0; while(!Q.empty()){ int now = Q.front(); Q.pop(); for(int i:G[now]){ //cout << a << " " << i << " " << now << " " << col[a] << " " << col[i] << " " << col[now] << "\n"; if(col[i] == -1){ col[i] = 1 - col[now]; in[i] = in[now] + 1; Q.push(i); } else{ if(col[i] == col[now]){ res = min(res,in[i] + in[now] + 1); } } } } } int ans = res; 3+ans <= K ? cout << "Yes" << "\n" : cout << "No" << "\n"; }