Pagini recente » Cod sursa (job #3294182) | Cod sursa (job #3197094) | Cod sursa (job #659492) | Cod sursa (job #2320701) | Cod sursa (job #1313600)
#include <stdio.h>
int main(){
FILE *in = fopen("chatnoir.in", "r");
FILE *out = fopen("chatnoir.out", "w");
int t, n, m, x, y, i;
fscanf(in, "%d", &t);
for(i = 0; i < t; i++){
fscanf(in, "%d%d%d%d", &n, &m, &x, &y);
if(n - x <= 4 || x - 1 <= 4 || m - y <= 4 || y - 1 <= 4)
fprintf(out, "DA\n");
else
fprintf(out, "NU\n");
}
fclose(in);
fclose(out);
return 0;
}