#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
int x[200005],n,l,r,q,br,a[200005];
void prefix(){
    for (int i=1;i<n;i++){
        a[i]=x[i]-x[i+1];
    }
}
int main(){
    cin >> n;
    for (int i=1;i<=n;i++){
        cin >> x[i];
    }
    cin >> q;
    prefix();
    for (int i=1;i<n;i++){
        cout << a[i] << " ";
    }
    cout << "\n";
    for (int i=1;i<=q;i++){
        cin >> l >> r;
        br=0;
        if (l-r==0) {
            cout << "DA\n";
            continue;
        }
        priority_queue <int> v;

        for (int j=l;j<r;j++){
//            cout << a[j] << " ";
            v.push(a[j]);
        }
//        cout << "\n";
//        sort(v.begin(),v.end());
//        for (int j=0;j<r-l;j++){
//            cout << v[j] << " ";
//        }
//        cout << v[r-l-2] << " " << v[r-l-1] << "\n";
        if (v.top()>0) br++;
        v.pop();
        if (v.top()>0) br++;
        if (br>1) cout << "NE\n";
        else cout << "DA\n";
    }

    return 0;
}

//v[r-l-1]>0 and v[r-l-2]>0