Pagini recente » Cod sursa (job #1820551) | Cod sursa (job #1062650) | Cod sursa (job #2239556) | Cod sursa (job #621418) | Cod sursa (job #639188)
Cod sursa(job #639188)
var f1,f2:text;
a:array[1..4] of integer;
t,i:longint;
n,m,x,y,min,j:integer;
begin
assign(f1,'chatnoir.in');
reset(f1);
assign(f2,'chatnoir.out');
rewrite(f2);
readln(f1,t);
for i:=1 to t do
begin
readln(f1,n,m,x,y);
a[1]:=x-1;
a[2]:=y-1;
a[3]:=n-x;
a[4]:=m-y;
min:=a[1];
for j:=2 to 4 do
if a[j]<min then min:=a[j];
if min<=4 then writeln(f2,'DA') else writeln(f2,'NU');
end;
close(f1);
close(f2);
end.