Problem list
Log in
#coci00019 · COCI 2006/2007 Contest 4

Sibice

Bronze III 1.0 s 32 MB

Young Mirko threw matches all over the floor of his room.

His mom did not like that and ordered him to put all the matches in a box. Mirko soon noticed that not all of the matches on the floor fit in the box, so he decided to take the matches that don't fit and throw them in the neighbour's garbage, where his mom (hopefully) won't find them.

Help Mirko determine which of the matches fit in the box his mom gave him. A match fits in the box if its entire length can lie on the bottom of the box. Mirko examines the matches one by one.

Input

The first line of input contains an integer $N$ ($1 \le N \le 50$), the number of matches on the floor, and two integers $W$ and $H$ ($1 \le W, H \le 100$), the dimensions of the box.

Each of the following $N$ lines contains a single integer between $1$ and $1000$ (inclusive), the length of one match.

Output

For each match, in the order they were given in the input, output on a separate line DA if the match fits in the box or NE if it does not.

Example 1

Input
5 3 4
3
4
5
6
7
Output
DA
DA
DA
NE
NE

Example 2

Input
2 12 17
21
20
Output
NE
DA
Source
COCI 2006/2007 Contest 4
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 1 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code