import sys input = sys.stdin.readline H,W,T=map(int,input().split()) sx,sy=map(int,input().split()) gx,gy=map(int,input().split()) sx-=1 sy-=1 gx-=1 gy-=1 MAP=[input().strip() for i in range(H)] OK=[[0]*W for i in range(H)] OK[sx][sy]=1 for turns in range(1,T): A=[[0]*W for i in range(H)] for i in range(H): for j in range(W): if MAP[i][j]!="0": A[i][j]=(int(MAP[i][j])-turns)%(1+int(MAP[i][j])) #print("!",A) OK2=[[0]*W for i in range(H)] for i in range(H): for j in range(W): if OK[i][j]==1: for z,w in [(i,j),(i+1,j),(i-1,j),(i,j+1),(i,j-1)]: if 0<=z0: OK2[z][w]=1 OK=OK2 if OK[gx][gy]==1: print("Yes") exit() #print(OK) print("No")