import java.util.*; public class Main { public static final int[] dx= {-1,0,0,1}; public static final int[] dy= {0,-1,1,0}; public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int v=sc.nextInt(); int ox=sc.nextInt()-1; int oy=sc.nextInt()-1; int[][] l=new int[n][n]; for(int i=0;i deq=new ArrayDeque<>(); deq.add(new FixedIntTuple(0, 0,v,false)); while(deq.size()>0) { FixedIntTuple fit=deq.removeFirst(); //System.out.println(fit); if(hp[fit.x][fit.y]=n||y<0||y>=n)continue; int vn=fit.v-l[x][y]; boolean f=fit.f; if(vn<=0)continue; if(!fit.f&&(fit.x==ox&&fit.y==oy)) { vn*=2; f=true; } deq.addLast(new FixedIntTuple(x, y, vn,f)); } } if(hp[n-1][n-1]>0) { System.out.println("YES"); }else { System.out.println("NO"); } } public static class FixedIntTuple{ public final int x,y,v; public final boolean f; /** * @param x * @param y */ public FixedIntTuple(int x, int y,int v,boolean f) { super(); this.x = x; this.y = y; this.v=v; this.f=f; } /* (非 Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { // TODO 自動生成されたメソッド・スタブ return String.format("FixedIntTuple:(%d,%d,%d)",x,y,v); } } }