#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; const int k=2520; int dh[]={1,0,0,0,-1}; int dw[]={0,1,0,-1,0}; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int h,w,t; cin>>h>>w>>t; int sy,sx,gy,gx; cin>>sy>>sx>>gy>>gx; sy--,sx--,gy--,gx--; vector S(h); rep(i,h) cin>>S[i]; vector> A(h,vector(w)); rep(i,h) rep(j,w) A[i][j]=S[i][j]-'0'; auto f=[&](int i,int j,int l){ return (A[i][j]-l+k)%(A[i][j]+1); }; vector>> dp(h,vector>(w,vector(t))); dp[sy][sx][0]=1; for(int l=0;l=h || nj>=w) continue; if(f(ni,nj,l+1)!=0) dp[ni][nj][l+1]=1; } } } rep(l,t){ if(dp[gy][gx][l]){ cout<<"Yes"<