Pagini recente » Cod sursa (job #191759) | Cod sursa (job #2090580) | Cod sursa (job #2144307) | Cod sursa (job #2877203) | Cod sursa (job #637343)
Cod sursa(job #637343)
var t, m, n, x, y, i:longint;
ok:boolean;
f, g:text;
buf1, buf2:array [1.. 1 shl 17] of char;
begin
assign (f, 'chatnoir.in'); settextbuf (f, buf1); reset (f);
assign (g, 'chatnoir.out'); settextbuf (g, buf2); rewrite (g);
readln (f, t);
for i := 1 to t do
begin
readln (f, n, m, x, y);
ok:=false;
if x<6 then ok:= true;
if y<6 then ok:= true;
if n-x<5 then ok:= true;
if m-y<5 then ok:= true;
if ok= true then writeln (g, 'DA') else writeln (g, 'NU');
end;
close (f); close (g);
end.