program z1;
const S1='YES';
S2='NO';
infile='input.txt';
outfile='output.txt';
var
x1,y1,x2,y2:longint;
c:string;
procedure init;
begin
assign(input,infile);
reset(input);
read(input,x1,y1,x2,y2);
close(input);
end;
procedure out;
begin
assign(output,outfile);
rewrite(output);
write(output,c);
close(output);
end;
begin
init;
if (abs(x1-x2)=1) or (x1=x2) and (abs(y1-y2)=1) or (y1=y2) then c:=S1 else c:=S2;
out;
end.
const S1='YES';
S2='NO';
infile='input.txt';
outfile='output.txt';
var
x1,y1,x2,y2:longint;
c:string;
procedure init;
begin
assign(input,infile);
reset(input);
read(input,x1,y1,x2,y2);
close(input);
end;
procedure out;
begin
assign(output,outfile);
rewrite(output);
write(output,c);
close(output);
end;
begin
init;
if (abs(x1-x2)=1) or (x1=x2) and (abs(y1-y2)=1) or (y1=y2) then c:=S1 else c:=S2;
out;
end.