// G. Hagopian -- Kattis Subice

#include <iostream>
#include <cmath>
using namespace std;

int main() {
	int N{}, W{}, H{}, D{}, M{};
	cin >> N >> W >> H;
	D = sqrt(W * W + H * H);
	while (N--) {
		cin >> M;
		if (M <= D) cout << "DA\n";
		else cout << "NE\n";
	}
}