#include <stdio.h>

int main(void) {
  int n, q, l, r;
  int flag = 0;
  scanf("%d", &n);
  int A[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  scanf("%d", &q);
  int L[q];
  int R[q];
  for (int i = 0; i < q; i++) {
    scanf("%d%d", &L[i], &R[i]);
  }
  for (int i = 0; i < q; i++) {
    if (L[i] == R[i] || R[i] - L[i] == 1) {
      printf("Da");
    }
    for (int j = L[i] - 1; L[i] < R[i] - 1; j++) {
      if (flag == 1) {
        flag = 0;
        printf("Ne\n");
        break;
      } else {
        printf("Da\n");
      }
      if (A[j + 1] < A[j]) {
        int niz[n - j - 1];
        for (int e = 0; i < n - j - 1; e++) {
          niz[e] = A[j + 2 + e];
        }
        for (int g = 0; g < n - j - 1; g++) {
          if (niz[q + 1] < niz[g]) {
            flag++;
            break;
          }
        }
      }
    }
  }

  return 0;
}