#Z15117. 铺地毯
铺地毯
Description
To prepare for a unique award ceremony, the organizers laid out several rectangular carpets in a rectangular area of the venue (which can be considered as the first quadrant of the plane coordinate system). There are a total of n carpets, numbered from 1 to n. These carpets are laid out sequentially in ascending order parallel to the coordinate axes, with each new carpet covering the ones laid before it. After all the carpets are laid, the organizers want to know the number of the topmost carpet covering a specific point on the ground. Note: Points on the edges or corners of the rectangular carpets are also considered covered.
Sample Input and Output 1 Explanation: As shown in the figure below, Carpet 1 is represented by a solid line, Carpet 2 by a dashed line, and Carpet 3 by a double solid line. The topmost carpet covering point (2, 2) is Carpet 3.
Sample Input and Output 2 Explanation: As shown in the figure below, Carpet 1 is represented by a solid line, Carpet 2 by a dashed line, and Carpet 3 by a double solid line. The topmost carpet covering point (4, 5) is Carpet 3.

Input Format
The first line contains an integer n, representing the total number of carpets.
The next n lines describe the information of the carpets. The (i+1)-th line contains four positive integers a, b, g, k, separated by spaces, representing the coordinates of the bottom-left corner (a, b) of the i-th carpet and its lengths along the x-axis and y-axis, respectively.
The (n+2)-th line contains two positive integers x and y, representing the coordinates of the point (x, y) to be queried.
Output Format
Output a single line containing an integer, which is the number of the topmost carpet covering the queried point. If no carpet covers the point, output -1.
Example Input 1
3
1 0 2 3
0 2 3 3
2 1 3 3
2 2
Example Output 1
3
Example Input 2
3
1 0 2 3
0 2 3 3
2 1 3 3
4 5
Example Output 2
-1
3
1 0 2 3
0 2 3 3
2 1 3 3
2 2
3
3
1 0 2 3
0 2 3 3
2 1 3 3
4 5
-1