把情况讨论清楚即可qaq
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
#define N 50010
inline char gc(){
static char buf[1<<16],*S,*T;
if(S==T){T=(S=buf)+fread(buf,1,1<<16,stdin);if(T==S) return EOF;}
return *S++;
}
inline int read(){
int x=0,f=1;char ch=gc();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=gc();}
while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=gc();
return x*f;
}
int n,m,a[N],w[N];
struct node{
int mx;
}tr[N<<2];
inline void pushup(int p){
tr[p].mx=max(tr[p<<1].mx,tr[p<<1|1].mx);
}
inline void build(int p,int l,int r){
if(l==r){tr[p].mx=w[l];return;}
int mid=l+r>>1;build(p<<1,l,mid);build(p<<1|1,mid+1,r);pushup(p);
}
inline int qmx(int p,int l,int r,int x,int y){
if(x>y) return -inf;
if(x<=l&&r<=y) return tr[p].mx;
int mid=l+r>>1,res=-inf;
if(x<=mid) res=max(res,qmx(p<<1,l,mid,x,y));
if(y>mid) res=max(res,qmx(p<<1|1,mid+1,r,x,y));
return res;
}
int main(){
// freopen("a.in","r",stdin);
n=read();
for(int i=1;i<=n;++i) a[i]=read(),w[i]=read();
build(1,1,n);m=read();
while(m--){
int xx=read(),yy=read();if(xx>yy){puts("false");continue;}
int x=lower_bound(a+1,a+n+1,xx)-a,y=lower_bound(a+1,a+n+1,yy)-a;
if(a[x]!=xx){
if(a[y]!=yy){puts("maybe");continue;}
int res=qmx(1,1,n,x,y-1);
if(res>=w[y]){puts("false");continue;}
else{puts("maybe");continue;}
}if(a[y]==yy){
int res=qmx(1,1,n,x+1,y-1);
if(w[y]>w[x]||res>=w[y]){puts("false");continue;}
if(y-x==yy-xx){puts("true");continue;}
puts("maybe");continue;
}int res=qmx(1,1,n,x+1,--y);
if(w[x]<=res){puts("false");continue;}
puts("maybe");continue;
}return 0;
}