Pagini recente » Cod sursa (job #1545638) | Cod sursa (job #1814861) | Cod sursa (job #253238) | Cod sursa (job #2100547) | Cod sursa (job #2786351)
#include <bits/stdc++.h>
#define din cin
#define dout out
#define pi 3.14159265359
#define sw(x,y) x^=y,y^=x,x^=y
#define bmin(a,b)((a<b)?(a):(b))
#define bmax(a,b)((a>b)?(a):(b))
#define ll long long
using namespace std;
ifstream in("chatnoir.in");
ofstream out("chatnoir.out");
int t,n,m,x,y;
int main()
{
in>>t;
while(t--)
in>>n>>m>>x>>y,out<<(min(min(x-1,y-1),min(n-x,m-y))<=4?"DA\n":"NU\n");
}