## COCI '06 Contest 4 #1 Sibice

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 Specification

The first line of input contains an integer , the number of matches on the floor, and two integers and , the dimensions of the box .

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

#### Output Specification

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.

#### Sample Input 1

5 3 4
3
4
5
6
7

#### Sample Output 1

DA
DA
DA
NE
NE

#### Sample Input 2

2 12 17
21
20

#### Sample Output 2

NE
DA