There are
- chooses one of the cities,
- introduces flights from that city towards all other cities where these flights do not currently exist, and at the same time cancels all existing flights from that city.
For instance, if from city
The citizens of this country are wondering if a day could come when the flight schedule will be complete. In other words, when between each two different cities a (direct) flight will exist. Write a programme that will, based on the current flight schedule, determine whether it is possible to have a Complete Day, or whether this will never happen, no matter what moves Krump makes.
Input Specification
The first line of input contains the integer
The second line contains the integer
Each of the following
Output Specification
The first and only line of output must contain DA
(Croatian for "yes") or NE
(Croatian for "no").
Sample Input 1
2
0
Sample Output 1
DA
Explanation for Sample Output 1
In the first step, Krump will introduce the (only possible) line 1-2
.
Sample Input 2
3
2
1 2
2 3
Sample Output 2
NE
Sample Input 3
4
2
1 3
2 4
Sample Output 3
DA
Explanation for Sample Output 3
If Krump first chooses city 1-2
, 1-4
and 2-4
will exist. If he then chooses city
Comments