#include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define N 100010
int n,a[N],w[N],f[N][25];
inline const int read(){
register int x=0,f=1;
register char ch=getchar();
while(ch>‘9‘||ch<‘0‘){if(ch==‘-‘)f=-1;ch=getchar();}
while(ch>=‘0‘&&ch<=‘9‘){x=x*10+ch-‘0‘;ch=getchar();}
return x*f;
}
inline void RMQ(){
for(int j=1;j<=20;j++){
for(int i=1;i+(1<<j)-1<=n;i++){
f[i][j]=max(f[i][j-1],f[i+(1<<j-1)][j-1]);
}
}
}
inline int query(int i,int j){
if(i>j) return -2000000000;
int k=log(j-i+1)/log(2);
return max(f[i][k],f[j-(1<<k)+1][k]);
}
int main(){
n=read();
for(int i=1;i<=n;i++) a[i]=read(),f[i][0]=w[i]=read();
RMQ();
int maxx,l,r,x,y,ans,T=read();
while(T--){
x=read();y=read();
l=lower_bound(a+1,a+n+1,x)-a;
r=lower_bound(a+1,a+n+1,y)-a;
if(l<=n&&a[l]==x){
if(r<=n&&a[r]==y){
maxx=query(l+1,r-1);
if(w[l]<w[r]) ans=0;
else if(maxx<w[r]){
if(r-l==y-x) ans=1;
else ans=-1;
}
else ans=0;
}
else{
maxx=query(l+1,r-1);
if(maxx<w[l]) ans=-1;
else ans=0;
}
}
else{
if(r<=n&&a[r]==y){
maxx=query(l,r-1);
if(maxx<w[r]) ans=-1;
else ans=0;
}
else ans=-1;
}
if(ans==1) puts("true");
else if(ans==-1) puts("maybe");
else puts("false");
}
return 0;
}