n, w, h = map(int, input().split()) s = (w**2 + h**2) ** 0.5 for _ in range(n): print("DA" if s >= int(input()) else "NE")