#include <cstdio>
#define Rep(i,n) for (int i=1; i<=n; i++)
#define For(i,l,r) for (int i=l; i<=r; i++)
#define Down(i,r,l) for (int i=r; i>=l; i--)
#define yes {printf("true\n"); continue;}
#define no {printf("false\n"); continue;}
#define maybe {printf("maybe\n"); continue;}
struct segment_tree {
int left,right,mid,max,lc,rc;
} tree[150000];
int n,m,rain[50010],year[50010],tot=1;
int Max(int A,int B) {return A>B?A:B;}
int Min(int A,int B) {return A<B?A:B;}
void Build(int l,int r,int node)
{
tree[node].left=l;
tree[node].right=r;
tree[node].mid=(l+r)/2;
if (l==r) {tree[node].max=rain[r];return;}
if (l<=tree[node].mid)
{
tot++;
tree[node].lc=tot;
Build(l,tree[node].mid,tot);
tree[node].max=Max(tree[tree[node].lc].max,tree[node].max);
}
if (tree[node].mid<r)
{
tot++;
tree[node].rc=tot;
Build(tree[node].mid+1,r,tot);
tree[node].max=Max(tree[tree[node].rc].max,tree[node].max);
}
}
int getmax(int l,int r,int node)
{
int t1,t2;
if (l>r||node==0) return 0;
if (l==tree[node].left&&r==tree[node].right) return tree[node].max;
t1=getmax(l,Min(r,tree[node].mid),tree[node].lc);
t2=getmax(Max(tree[node].mid+1,l),r,tree[node].rc);
return Max(t1,t2);
}
int ID(int y,int flag)
{
int left,right,mid;
left=0; right=n+1;
while (right-left>1)
{
mid=(left+right)/2;
if (year[mid]<y) left=mid;
else right=mid;
}
if (flag)
{
if (year[right]<=y) return right+1;
if (year[right]>y) return right;
if (year[left]>y) return left;
}
else {
if (year[left]>=y) return left-1;
if (year[left]<y) return left;
if (year[right]<y) return right;
}
}
int main()
{
int X,Y,l,r,most,s,t;
scanf("%d",&n);
Rep(i,n) scanf("%d%d",&year[i],&rain[i]);
Build(1,n,1);
year[0]=-1100000000;
year[n+1]=1100000000;
scanf("%d",&m);
Rep(i,m)
{
//printf("%d",i);
scanf("%d%d",&Y,&X);
l=ID(Y,1);
r=ID(X,0);
if (year[l-1]==Y&&year[r+1]==X&&rain[l-1]<rain[r+1]) no
if (l>r&&(year[l-1]!=Y||year[r+1]!=X)) maybe
most=getmax(l,r,1);
if (year[l-1]==Y&&rain[l-1]<=most) no
if (year[r+1]==X&&rain[r+1]<=most) no
if (year[l-1]!=Y||year[r+1]!=X||r-l+1<X-Y-1) maybe
yes
}
return 0;
}