Little Slavko dreamed of an unusual dream. One sunny morning,
After sunset, rectangles climbed down the roof and went to sleep dreaming of beautiful Hawaii beaches and their bodies tanned to yellow due to the sun exposure. However, the next morning they spotted a problem! Only parts of rectangles that had been directly exposed to the sun became yellow. In other words, if parts of a rectangle were covered by some other rectangle, then those parts didn't change colour from white to yellow.
Sadly, rectangles that did not change the colour entirely were forced to cancel the trip. Write a program that will determine for each rectangle if it is going to Hawaii or not.
Input
The first line contains a positive integer
Output
You have to print DA
(Croatian for yes) if NE
(Croatian for no).
Scoring
In test cases worth 10% of total points, it will hold that
Sample Input 1
5
1 1 4 2
6 1 1 1
2 2 2 3
3 4 3 2
4 0 1 2
Sample Output 1
NE
DA
NE
DA
DA
Explanation for Sample Output 1
The first and the third rectangle are not entirely exposed to the sun, meaning they won't change colour entirely and won't go to Hawaii. Other rectangles are exposed to the sun entirely.
Sample Input 2
3
3 3 1 1
2 2 3 3
1 1 5 5
Sample Output 2
NE
NE
DA
Comments