Given two families of non-crossing cuts across a rectangle and points inside it, find the piece containing the most peppers.
Medium7GeometrySortingPrefix sumNo attempts yetTime limit1sMemory limit512 MBMirko has a two dimensional cheese of width S and height V. He makes A cuts of type A, each of which crosses both the left edge and the right edge of the cheese. Then he makes B cuts of type B, each of which crosses both the top edge and the bottom edge. Two cuts of the same type never meet. Inside the cheese there are N hot peppers, each given by its x and y coordinates. After the cheese is cut, Mirko wants to know how many peppers the hottest piece holds. Help Mirko.

The first line contains the width S and the height V of the cheese (1≤S≤107, 1≤V≤107).
The second line contains the number of peppers N (1≤N≤100000). Each of the next N lines contains two integers x and y, the coordinates of one pepper (0<x<S, 0<y<V). No pepper lies on a cut, and no two peppers share the same coordinates.
The next line contains the number A of cuts that cross both the left edge and the right edge (1≤A≤100000). Each of the next A lines contains two integers yL and yR, the y coordinates where that cut meets the left edge and the right edge (0<yL<V, 0<yR<V).
The next line contains the number B of cuts that cross both the top edge and the bottom edge (1≤B≤100000). Each of the next B lines contains two integers xT and xB, the x coordinates where that cut meets the top edge and the bottom edge (0<xT<S, 0<xB<S).
No two cuts that cross the left and the right edge intersect or touch each other. The same holds for the cuts that cross the top and the bottom edge.
The coordinates follow the standard Cartesian system. x grows from left to right and y grows from bottom to top.
Print one line with the number of peppers in the piece that contains the most peppers.