#include <bits/stdc++.h>
using namespace std;
#define ff(i,a,n) for(int i = a;i<n;++i)
int a[200005];
void solve(){
	bool ans = true;
	int l, r;
	cin>>l>>r;
	l--;r--;
	ff(i,l,r){
		
	}
	if(ans){
		cout<<"DA";
	}else{
		cout<<"NE";
	}
}
int main(int argc, char** argv) {
	ios_base::sync_with_stdio(false);
	int n;cin>>n;
	ff(i,a,n)cin>>a[i];
	int t;cin>>t;
	while(t--){
		solve();
		cout<<endl;
	}
	return 0;
}