import math
n, w, h = map(int, input().split())
box = math.sqrt(w * w + h * h)
for i in range(n):
match = int(input())
if match > box:
print("NE")
else:
print("DA")
n, w, h = map(int,input().split())
p = ww + hh
for i in range(n):
s = int(input())
if s*s > p:
print("NE")
else:
print("DA")