#include<iostream>
#include<cstring>
#include<cstdio>
#include<windows.h>
using namespace std;
int main()
{
int n,a[40004],x,y,ans=-1;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=0;j<=3;j++)
{
cin>>a[i+j];
}
}
cin>>x>>y;
for(int i=1;i<=n;i++)
{
if(x>=a[i]&&y>=a[i+1]&&x<=a[i]+a[i+2]&&y<=a[i+1]+a[i+3])
{
ans=n;
}
}
cout<<ans;
return 0;
}
哪里有错啊,欲哭无泪