N, V, Ox, Oy = map(int, input().split()) Ox -= 1 Oy -= 1 L = [list(map(int, input().split())) for _ in range(N)] visited = [[0] * N for _ in range(N)] def dfs(x, y, v): visited[y][x] = v if x == N - 1 and y == N - 1: return 1 dx = [-1, 1, 0, 0] dy = [0, 0, -1, 1] for d in range(4): nx = x + dx[d] ny = y + dy[d] if nx >= 0 and nx < N and ny >= 0 and ny < N: r = v - L[ny][nx] if r > visited[ny][nx]: if dfs(nx, ny, r): return 1 return 0 possible = dfs(0, 0, V) if not possible: r = visited[Oy][Ox] if not (Ox == 0 and Oy == 0) and r > 0: visited = [[0] * N for _ in range(N)] possible = dfs(Ox, Oy, r * 2) print("YES" if possible else "NO")