#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from math import sqrt

[n, w, h] = [int(i) for i in next(sys.stdin).split(" ")]
d = sqrt(w**2 + h**2)
for line in sys.stdin:
    match = int(line)
    if match < w or match < h or match < d:
        print("DA")
    else:
        print("NE")


96eb31451aa1c77628683d5b937addb07bc19fc7
<mask token>

<mask token>
for line in sys.stdin:
    match = int(line)
    if match < w or match < h or match < d:
        print('DA')
    else:
        print('NE')

<mask token>
[n, w, h] = [int(i) for i in next(sys.stdin).split(' ')]
d = sqrt(w ** 2 + h ** 2)
for line in sys.stdin:
    match = int(line)
    if match < w or match < h or match < d:
        print('DA')
    else:
        print('NE')

import sys
from math import sqrt
[n, w, h] = [int(i) for i in next(sys.stdin).split(' ')]
d = sqrt(w ** 2 + h ** 2)
for line in sys.stdin:
    match = int(line)
    if match < w or match < h or match < d:
        print('DA')
    else:
        print('NE')

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from math import sqrt

[n, w, h] = [int(i) for i in next(sys.stdin).split(" ")]
d = sqrt(w**2 + h**2)
for line in sys.stdin:
    match = int(line)
    if match < w or match < h or match < d:
        print("DA")
    else:
        print("NE")

