#include using namespace std; using ll = long long; int N; ll L[200*200]; vector> graph; vector dijkstra(int start) { const ll INF = 1e9 + 10; vector dist(N*N, INF); dist[start] = 0; using P = pair; priority_queue, greater

> pq; pq.emplace(0, start); while (!pq.empty()) { auto [dv, v] = pq.top(); pq.pop(); if (dv != dist[v]) continue; for (auto &w : graph[v]) { ll dw = dv + L[w]; if (dw < dist[w]) { dist[w] = dw; pq.emplace(dw, w); } } } return dist; } bool solve(){ int V,Ox,Oy; cin>>N>>V>>Ox>>Oy; --Ox,--Oy; graph.resize(N*N,unordered_set()); const int oasis=Ox*N+Oy; const int start=0,goal=N*N-1; for(int i=0;i>L[i]; for(int i=0;i0; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout<<(solve()?"YES":"NO")<