## CPIR - Counting Points In Rectangles

You're given a set **P** of *N* points in the plane, and a set **R** of *M* rectangles (also in the plane ).

For each rectangle from **R** determine the number of points from **P** that lie inside it or on its sides.

### Input

The first line of input contains the integer *N. *(1 ≤* N ≤ *200000)

Each of the next *N* lines contains a pair of integers (*x*_{i, }*y*_{i}), the coordinates of the i-th point. (0 ≤* x _{i}, y_{i}* ≤ 200000)

The next line of input contains the integer M.* *(1 ≤* M ≤ *200000)

Each of the next *M* lines contains four integers (*x _{1}*

_{i}

_{,}

_{ }

*y*

_{1}

_{i}_{, x2i,}*, specifying two opposite vertices of the i-th rectangle.*

_{ y2i})(0 ≤ *x _{1i} < x_{2i} *≤ 200000, 0 ≤

*y*≤ 200000)

_{1i }< y_{2i}

### Output

Output exactly *M *lines, i-th containing the number of points in the i-th rectangle.

### Example

**Input:**

4

0 0

1 3

2 7

3 3

2

0 0 3 3

0 0 3 7

Output:

3

4

Added by: | gustav |

Date: | 2014-01-10 |

Time limit: | 1s |

Source limit: | 50000B |

Memory limit: | 1536MB |

Cluster: | Cube (Intel G860) |

Languages: | All except: ASM64 |

Resource: | Classic |