var
x, y, x1, y1: integer;
begin
readln(x);
readln(y);
readln(x1);
readln(y1);
if(x + 1 = x1) and (y + 2 = y1) and (x + 1 < 9) and (y + 2 < 9) then begin write('YES');exit; end;
if(x - 1 = x1) and (y + 2 = y1) and (x - 1 > 0) and (y + 2 < 9) then begin write('YES');exit; end;
if(x + 2 = x1) and (y + 1 = y1) and (x + 2 < 9) and (y + 1 < 9) then begin write('YES');exit; end;
if(x - 2 = x1) and (y + 1 = y1) and (x - 2 > 0) and (y + 1 < 9) then begin write('YES');exit; end;
if(x + 1 = x1) and (y - 2 = y1) and (x + 1 < 9) and (y - 2 > 0) then begin write('YES');exit; end;
if(x + 2 = x1) and (y - 1 = y1) and (x + 2 < 9) and (y - 1 > 0) then begin write('YES');exit; end;
if(x - 1 = x1) and (y - 2 = y1) and (x - 1 > 0) and (y - 2 > 0) then begin write('YES');exit; end;
if(x - 2 = x1) and (y - 1 = y1) and (x - 2 > 0) and (y - 1 > 0) then begin write('YES');exit; end;
write('NO');
end.