#include <bits/stdc++.h>

using namespace std;


void update_queues_min(priority_queue<int>& min_queue, priority_queue<int>& max_queue, int el){

    while(!min_queue.empty() && min_queue.top() >= el){
        max_queue.push(min_queue.top());
        min_queue.pop();
    }

    while(!max_queue.empty() && max_queue.top() < el){
        min_queue.push(max_queue.top());
        max_queue.pop();
    }
}

void update_queues_max(priority_queue<int, vector<int>, greater<int>>& min_queue, priority_queue<int, vector<int>, greater<int>>& max_queue, int el){

    while(!min_queue.empty() && min_queue.top() >= el){
        max_queue.push(min_queue.top());
        min_queue.pop();
    }

    while(!max_queue.empty() && max_queue.top() < el){
        min_queue.push(max_queue.top());
        max_queue.pop();
    }
}

int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int t,n,k;
    cin>>t>>n>>k;

    priority_queue<int> min_queue_min;
    priority_queue<int, vector<int>, greater<int>> max_queue_max;

    priority_queue<int,vector<int>, greater<int>> min_queue_max;
    priority_queue<int> max_queue_min;


    int x;
    for(int i=0;i<n;i++){
        cin>>x;
        if(x <0){
            min_queue_min.push(x);
            min_queue_max.push(x);
        }else{
            max_queue_min.push(x);
            max_queue_max.push(x);
        }
    }

    int tr_min = 0;

    for(int i=0;i<n;i++){

        if(!max_queue_min.empty() && max_queue_min.top() >= tr_min){

            tr_min++;
            max_queue_min.pop();
            update_queues_min(min_queue_min, max_queue_min, tr_min);
        }else if(!min_queue_min.empty()){
            tr_min--;
            min_queue_min.pop();
            update_queues_min(min_queue_min, max_queue_min, tr_min);
        }

    }

    int tr_max = 0;

    for(int i=0;i<n;i++){

        if(!min_queue_max.empty() && min_queue_max.top() <= tr_min){
            min_queue_max.pop();
            tr_max--;
            update_queues_max(min_queue_max,max_queue_max,tr_max);

        }else if(!max_queue_max.empty()){
            max_queue_max.pop();
            tr_max++;
            update_queues_max(min_queue_max,max_queue_max,tr_max);

        }
    }

    if(t ==0){
        if(k >= tr_min && k<= tr_max){
        cout<<"DA";
        }else{
            cout<<"NE";
        }
    }else{
        while(true){

        }
    }


    return 0;
}