N, V, Ox, Oy = map(int, input().split()) Ox -= 1 Oy -= 1 L = [[int(j) for j in input().split()] for i in range(N)] memo = [[0 for i in range(N)] for j in range(N)] memo[0][0] = V course = [(1, 0), (0, 1), (-1, 0), (0, -1)] stack = [(0, 0, V, True)] while stack: tmp = stack.pop() for i in course: y, x = tmp[0] + i[0], tmp[1] - i[1] if x < 0 or x >= N or y < 0 or y >= N: continue v = tmp[2] - L[y][x] if v <= memo[y][x]: continue if x == N - 1 and y == N - 1: print('YES') exit() if y == Oy and x == Ox and tmp[-1]: memo[y][x] = v * 2 stack.append((y, x, memo[y][x], False)) else: memo[y][x] = v a = tmp[-1] stack.append((y, x, memo[y][x], a)) print('NO')