#include using namespace std; #define int long long signed main(){ int H,W,K,L,R; cin>>H>>W>>K>>L>>R; vector> S(H,vector(W)); for(int i=0;i>S[i][j]; vector> G(H*W); for(int i=0;i dist(H*W,1e18); dist[0] = 0; queue q; q.push(0); while(!q.empty()){ int pos = q.front(); q.pop(); for(int x:G[pos]){ if(dist[x] != 1e18) continue; dist[x] = dist[pos] + 1; q.push(x); } } if(dist[H*W-1] == 1e18 || dist[H*W-1]%2 != K%2 || (R-L)%2 == 0){ cout<<"No"<= L || dist[H*W-1]-dist[i*W+j] > K-R || dist[i*W+j]%2 == L%2 || (dist[H*W-1]-dist[i*W+j])%2 != (K-R)%2) continue; bool a = (i != 0 && i != H-1 && S[i-1][j] == '.' && S[i+1][j] == '.'); bool b = (j != 0 && j != W-1 && S[i][j-1] == '.' && S[i][j+1] == '.'); if(a){ cout<<"Yes"<