// PascalABC.NET 3.2, сборка 1338 от 16.11.2016 uses GraphABC; begin var s:=ReadlnString('Укажите время MM:CC'); var m:=s.Left(2).ToInteger; var c:=s.Right(2).ToInteger; var i:=m; var j:=c; Font.Size:=60; Font.Color:=clBlue; repeat while i<60 do begin while j<60 do begin if i<10 then s:='0'+i+':' else s:=i+':'; if j<10 then s+='0'+j else s+=j; FillRect(50,100,350,400); DrawTextCentered(50,100,350,400,s); Inc(j); Sleep(1000) end; j:=0; Writeln; Inc(i) end; i:=0 until False end.
uses GraphABC;
begin
var s:=ReadlnString('Укажите время MM:CC');
var m:=s.Left(2).ToInteger;
var c:=s.Right(2).ToInteger;
var i:=m;
var j:=c;
Font.Size:=60;
Font.Color:=clBlue;
repeat
while i<60 do begin
while j<60 do begin
if i<10 then s:='0'+i+':' else s:=i+':';
if j<10 then s+='0'+j else s+=j;
FillRect(50,100,350,400);
DrawTextCentered(50,100,350,400,s);
Inc(j);
Sleep(1000)
end;
j:=0;
Writeln;
Inc(i)
end;
i:=0
until False
end.
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.