В9
Uses crt;
label tf, ft;
var u,i,j,k,k1,n, n1,x,y,z,g:integer; ax, ay:array[1..4] of integer; t1,t2, flag:Boolean;
begin
clrscr;
write('koordinat. XY '); readln(x,y);
case x of
0: x:=1;
1: x:=2;
2: x:=3;
3: x:=4;
end;
case y of
0: y:=1;
1: y:=2;
2: y:=3;
3: y:=4;
end;
k:=1;
for i:=1 to 4 do begin
ax[i]:=k;
inc(k);
end;
k1:=1;
for i:=1 to 4 do begin
ay[i]:=k1;
inc(k1);
end;
for i:=1 to 4 do begin
if ax[i]=x then begin t1:=true; n:=ax[i]; break; end;
end;
if t1 = false then begin flag:=false; goto ft; end;
case n of
1: n1:=0;
2: n1:=1;
3: n1:=2;
4: n1:=3;
end;
case n1 of
0: goto tf;
1: begin
for i:=1 to 4 do begin
if ay[i]=y then begin t2:=true; flag:=true; y:=ay[i]; break; end;
end;
end;
2: begin
for i:=1 to 4 do begin
if ay[i]=y then begin t2:=true; flag:=true; y:=ay[i]; break; end;
end;
end;
3: goto tf;
end;
if t2 = false then begin flag:=false; goto ft; end;
{case y of
1: z:=0;
2: z:=1;
3: z:=2;
4: z:=3;
end;}
tf:
if ((n1=0) or (n1=3)) then begin if ((y=1) or (y=4)) then flag:=true; end
else flag:=false;
writeln;
ft:
writeln(flag);
readln
end.