N, W, H = map(int, input().split()) print("\n".join(["DA" if int(input()) <= (W**2 + H**2)**0.5 else "NE" for _ in range(N)]))