Pagini recente » Cod sursa (job #2985165) | Cod sursa (job #3180518) | Cod sursa (job #3208903) | Cod sursa (job #440655) | Cod sursa (job #635349)
Cod sursa(job #635349)
Program chatnoir;
var m,n,x,y,i,t:longint;
b1,b2:array [1..1 shl 15] of char;
fi,fo:text;
begin
assign(fi,'chatnoir.in');
assign(fo,'chatnoir.out');
settextbuf(fi,b1);
settextbuf(fo,b2);
reset(fi); rewrite(fo);
readln(fi,t);
for i:=1 to t do begin
readln(fi,n,m,x,y);
if ((n-x<=5) and (m-y<=5)) or ((x<=5) and (y<=5)) then writeln(fo,'DA')
else writeln(fo,'NU');
end;
close(fo);
end.