import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int sx = sc.nextInt()-1; int sy = sc.nextInt()-1; int gx = sc.nextInt()-1; int gy = sc.nextInt()-1; int [][] Hight = new int [H][W]; int [][] dist = new int [H][W]; for(int i=0; i q = new LinkedList<>(); int [] dx = {1,0,-1,0}; int [] dy = {0,1,0,-1}; q.add(sx); q.add(sy); dist[sx][sy]=0; while(!q.isEmpty()){ int x = q.poll(); int y = q.poll(); if(x==gx&&y==gy){ System.out.println("YES"); return; } for(int k=1; k<=2; k++){ for(int i=0; i<4; i++){ int nx = x+k*dx[i]; int ny = y+k*dy[i]; if(nx<0||ny<0||nx>=H||ny>=W)continue; if(dist[nx][ny]!=-1)continue; if( (k==1&&Math.abs(Hight[nx][ny]-Hight[x][y])<=1)||(k==2&&Math.abs(Hight[nx][ny]-Hight[x][y])==0) ){ dist[nx][ny]=dist[x][y]+1; q.add(nx); q.add(ny); } } } } System.out.println("NO"); } }