import java.util.Scanner;
class Main {
static int getNumb() {
Scanner sxy = new Scanner(System.in);
return sxy.nextInt();
}
public static void main(String [ ] args) {
int x1 = getNumb();
int y1 = getNumb();
int x2 = getNumb();
int y2 = getNumb();
String can = "NO";
if((x1 + 1 == x2) || (x1 - 1 == x2) && y1 == y2) {
can = "YES";
}
else if((y1 + 1 == y2) || (y1 - 1 == y2) && x1 == x2) {
can = "YES";
}
else if((x1 + 1 == x2 && y1 + 1 == y2) || (x1 + 1 == x2 && y1 - 1 == y2) || (x1 - 1 == x2 && y1 + 1 == y2) || (x1 - 1 == x2 && y1 - 1 == y2)) {
can = "YES";
}
System.out.print(can);
}
}