P6320 [COCI 2006/2007 #4] SIBICE
Background
Young Mirko throws matches everywhere. His mother wants him to put the matches into a box.
Description
Mirko now needs to put $n$ matches into a rectangular box of size $w \times h$.
Now he wants you to determine, for each of the $n$ matches, whether it can fit into the box.
We can treat the box as a plane; you only need to check whether the match can be placed within this plane.
Input Format
The first line contains three integers $n, w, h$.
The next $n$ lines each contain an integer in the range $[1,1000]$, representing the length of a match.
Output Format
Output $n$ lines. For each match, output `DA` if it can fit, otherwise output `NE`.
Explanation/Hint
#### Constraints
For $100\%$ of the testdata, it is guaranteed that $1 \le n \le 50$, $1 \le w, h \le 100$.
#### Notes
**This problem is translated from [COCI2006-2007](https://hsin.hr/coci/archive/2006_2007/) [CONTEST #4](https://hsin.hr/coci/archive/2006_2007/contest4_tasks.pdf) *T1 SIBICE***
Translated by ChatGPT 5