#include <iostream>
#define forn(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
const int oo = 2e5+7;
int n, q, a[oo], b[oo], p[oo];
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n;
    forn(i, n) cin >> a[i];
    forn(i, n-1) b[i] = a[i] <= a[i+1];
    p[0] = b[0];
    forn(i, n-1) p[i+1] = p[i] + b[i+1];

    cin >> q;
    while (q--) {
        int l, r;
        cin >> l >> r;
        l--, r--;
        int br_rastucih = (r == 0 ? 0 : p[r-1]) - (l == 0 ? 0 : p[l-1]) + 1;
        int br_el = r - l + 1;
        cout << (br_rastucih + 1 >= br_el ? "DA" : "NE") << endl;
    }
}