Pagini recente » Cod sursa (job #2905157) | Cod sursa (job #936550) | Cod sursa (job #22854) | Cod sursa (job #3184771) | Cod sursa (job #917552)
Cod sursa(job #917552)
var n,m,x,y,min:longint;
t,i:longint;
bufin,bufout:array[1..65000]of byte;
begin
assign(input,'chatnoir.in'); reset(input);
assign(output,'chatnoir.out'); rewrite(output);
settextbuf(input,bufin);
settextbuf(output,bufout);
readln(t);
for i := 1 to t do
begin
readln(n,m,x,y);
min := x-1;
if min > n-x then min := n-x;
if min > y-1 then min := y-1;
if min > m-y then min := m-y;
if min >= 5 then writeln('NU') else writeln('DA');
//writeln(x,' ',n-x+1,' ',y,' ',m-y+1);
end;
close(input);
close(output);
end.