#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<algorithm>
#define FOR(i,a,b) for(i=(a);i<=(b);i++)
#define ROF(i,a,b) for(i=(a);i>=(b);i--)
#define pb push_back
#define mp make_pair
#define lc(x) (x<<1)
#define rc(x) ((x<<1)+1)
#define N 500010
using namespace std;
typedef long long LL;
typedef long double LD;
int ye[N],va[N],n,m;
struct segtree
{
int col[N],l[N],r[N],Max[N],rv[N],lv[N];
void upd(int x)
{
Max[x]=max(Max[lc(x)],Max[rc(x)]);
col[x]=col[lc(x)]&&col[rc(x)]&&(rv[lc(x)]+1==lv[rc(x)]);
}
void build(int x,int L,int R)
{
l[x]=L;r[x]=R;lv[x]=ye[L];rv[x]=ye[R];int mid=(L+R)>>1;
if (L==R) {col[x]=1;Max[x]=va[L];return;}
build(lc(x),L,mid);build(rc(x),mid+1,R);upd(x);
}
int qmax(int x,int L,int R)
{
if (L>R) return 0;
if (l[x]==L&&r[x]==R) return Max[x];
int mid=(l[x]+r[x])>>1;
if (R<=mid) return qmax(lc(x),L,R);
if (L>mid) return qmax(rc(x),L,R);
return max(qmax(lc(x),L,mid),qmax(rc(x),mid+1,R));
}
int qcol(int x,int L,int R)
{
if (l[x]==L&&r[x]==R) return col[x];
int mid=(l[x]+r[x])>>1;
if (R<=mid) return qcol(lc(x),L,R);
if (L>mid) return qcol(rc(x),L,R);
return (rv[lc(x)]+1==lv[rc(x)])&&qcol(lc(x),L,mid)&&qcol(rc(x),mid+1,R);
}
}Tree;
bool exist(int x){return binary_search(ye+1,ye+1+n,x);}
int getx(int x){return lower_bound(ye+1,ye+1+n,x)-ye;}
int main()
{
ios::sync_with_stdio(false);
int i,X,Y;
scanf("%d",&n);
FOR(i,1,n) scanf("%d%d",&ye[i],&va[i]);
scanf("%d",&m);
Tree.build(1,1,n);
FOR(i,1,m)
{
scanf("%d%d",&Y,&X);
bool ex=exist(X),ey=exist(Y);
if (!ex&&!ey) printf("maybe\n");
else if (ex&&!ey)
{
int py=getx(Y);
if (ye[py]==X) printf("maybe\n");
else
{
int px=getx(X);
if (Tree.qmax(1,py,px-1)>=va[px]) printf("false\n");
else printf("maybe\n");
}
}else if (!ex&&ey)
{
int px=getx(X)-1;
if (ye[px]==Y) printf("maybe\n");
else
{
int py=getx(Y);
if (Tree.qmax(1,py+1,px)<va[py]) printf("maybe\n");
else printf("false\n");
}
}else
{
int px=getx(X),py=getx(Y);
if (va[px]>va[py]) printf("false\n");
else
{
int Max=Tree.qmax(1,py+1,px-1);
if (Max>=va[px]) printf("false\n");
else if (Tree.qcol(1,py,px)) printf("true\n");
else printf("maybe\n");
}
}
}
return 0;
}