test = input() a, b, c = test.split(' ') max_size = int((int(b)**2+int(c)**2)**0.5) answers = [] for i in range(int(a)): match = int(input()) if match <= max_size: answers.append('DA') else: answers.append('NE') for val in answers: print(val)