#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]) {
      printf("Da\n");
    } else if (R[i] - L[i] == 1 && R[i] == 1) {
      printf("Ne\n");
    } else if (R[i] - L[i] == 1 && R[i] != 1) {
      printf("Da");
    } else if (R[i] - L[i] == 2) {
      if (L[i] > R[i]) {
        printf("Da");
      }
    } else {
      for (int j = L[i] - 1; j < R[i] - 2; j++) {
        if (A[j + 1] < A[j]) {
          for (int e = j + 2; e < R[i] - 2; e++) {
            if (A[e + 1] < A[e]) {
              flag++;
              break;
            }
          }
          if (flag == 0) {
            printf("Da\n");
          } else {
            printf("Ne\n");
          }
          flag = 0;
        }
      }
    }
  }
  return 0;
}