Quadrant Queries
There are n points in the plane. The i-th point has coordinates (x_i, y_i). Perform the following queries, and always include the boundry points (i and j) in the operation:
1) Reflect all points between points i and j along the X axis. This query is represented as “X i j”
2) Reflect all points between points i and j along the Y axis. This query is represented as “Y i j”
3) Count how many points between points i and j lie in each of the 4 quadrants. This query is represented as “C i j”
Input
The first line contains n (1 ≤ n ≤ 100000), the number of points. n lines follow. The i-th line contains x_i and y_i separated by a space. The next line contains q (1 ≤ q ≤ 1000000) the number of queries. The next q lines contain one query each, of one of the above forms. All indices are 1 indexed. You may assume that no point lies on the X or the Y axis. All (x_i, y_i) will fit in a 32-bit signed integer.
Output
Print one line for each query of the type “C i j” (1 ≤ i ≤ j ≤ n). The corresponding line contains 4 integers; the number of points having indices in the range [i..j] in the 1st, 2nd, 3rd and 4th quadrants respectively.