You are given a multiset a_1, a_2, \ldots, a_n consisting of numbers.
Next, you will be given types of queries:
1 x — Add the positive integer to the multiset.
2 x — Delete one occurrence of from the multiset. It is guaranteed that there is at least one in the multiset when this operation is performed.
3 x — Find the number of ordered pairs of elements and in the multiset such that \left\lfloor \frac{p}{q} \right\rfloor = x, where is the greatest integer not greater than . It is guaranteed that there is at least one element in the multiset when this query is asked. Note that is greater than .
You need to process queries. For each query of the rd type, output the required number of pairs.
The first line contains an integer (1 \le n \le 10^5) — the number of elements in the initial array.
The second line contains integers a_1, a_2, \ldots, a_n (1 \le a_i \le 10^5) — the elements of the multiset.
The third line contains an integer (1 \le q \le 10^5) — the number of queries.
Each of the next lines contains a query, given as two integers (1 \le type \le 3) and such that
where is the type of query and is the number in the query. It is guaranteed that there is at least one query of type .
For each query of the rd type, output the required number of pairs for the given .
Example
( points): n \le 500, q \le 500, a_i \le 500, x \le 500 in each query.
( points): a_i \le 1000, x \le 1000 in each query.
( points): there are no queries of type and .
( points): there are no queries of type .
( points): no additional constraints.