h, w, T = map(int, input().split()) si, sj = map(int, input().split()) gi, gj = map(int, input().split()) si -= 1 sj -= 1 gi -= 1 gj -= 1 A = [list(map(int, input())) for _ in range(h)] dp = [[False] * w for _ in range(h)] dp[si][sj] = True di = [0, 1, 0, -1, 0] dj = [1, 0, -1, 0, 0] for t in range(T): ndp = [[False] * w for _ in range(h)] for i in range(h): for j in range(w): if not dp[i][j]: continue for k in range(5): ni = i + di[k] nj = j + dj[k] if ni < 0 or ni >= h or nj < 0 or nj >= w: continue b = (A[ni][nj] - t - 1) % (A[ni][nj] + 1) if b != 0: ndp[ni][nj] = True dp = ndp if dp[gi][gj]: print("Yes") exit() print("No")