#include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main() { int h,w,x,y; cin>>h>>w>>x>>y; x--,y--; vector> a(h,vector(w)); rep(i,h){ rep(j,w)cin>>a[i][j]; } long long c = a[x][y]; a[x][y] = 0; vector f(h,vector(w,false)); f[x][y] = true; priority_queue>,vector>>,greater>>> Q; Q.emplace(a[x][y],make_pair(x,y)); vector dx = {1,-1,0,0},dy = {0,0,1,-1}; while(Q.size()>0){ long long D = Q.top().first; x = Q.top().second.first; y = Q.top().second.second; if(D>=c)break; Q.pop(); c += D; //cout<=h||yy<0||yy>=w)continue; if(f[xx][yy])continue; Q.emplace(a[xx][yy],make_pair(xx,yy)); f[xx][yy] = true; } } if(Q.size()>0)cout<<"No"<