Count Offline#2951

Count Offline

ثانيتان
256 ميغابايت
سهل

You are given a set of points on a plane.

You need to process two types of queries:

المدخلات

The first line contains the number of points (1 \le N \le 50000). Each of the next lines contains the coordinates of a point. Then follows the number of queries (1 \le Q \le 100000), followed by queries. All coordinates are integers from to 10^9 inclusive.

المخرجات

For each query of type ?, output a single integer — the number of points inside the specified rectangle.

أمثلة

مثال 1

Loading
Loading