Sapper
After successfully completing his tasks, Matvey decided to play "Minesweeper". The game features a square field of size N x N, where some cells contain bombs. Your task is to efficiently answer queries about the number of bombs within a specified subrectangle. Since Matvey is still busy with other tasks, he needs your help to handle these queries.
Input
An integer N (1 ≤ N ≤ 10^5), representing the size of the field.
N points, each with integer coordinates (X, Y), indicating the positions of the bombs. All X and Y are distinct and satisfy (0 ≤ X, Y ≤ N-1).
An integer M (1 ≤ M ≤ 10^5), representing the number of queries.
M queries, each given on a separate line in the form x1 y1 x2 y2, specifying the corners of the subrectangle.
Output
For each query, output a single line containing the number of bombs within the specified subrectangle.