For two arrays of integers A of size N and B of size M, we define a grid G(A,B) of size N×M, where cell (i,,j) is colored black if 0≤A_i+B_j and white otherwise.
We also define F(A,B) as the number of black rectangles inside G(A,B), where each cell of G(A,B) is either entirely included in or disjoint with the rectangle.
In other words, F(A,B) is equal to the number of tuples (l_1,,r_1,,l_2,,r_2) such that 1≤l_1≤r_1≤N, 1≤l_2≤r_2≤M and each cell (i,, j) in G(A,B) is colored black for all i, j such that l_1≤i≤r_1, l_2≤j≤r_2.
Initially, only A_1 and B_1 are given.
Then, you should process following Q queries:
The first line contains one integer Q.
The second line contains two space-separated integers, A_1 and B_1.
Each of the following Q lines contains two space-separated integers denoting the queries in the described form.
For each query of types 1 and 3, output a single integer denoting the answer to that query. Each answer should go on its own line.
Let N be the size of array A after processing all queries, and M be the size of array B after processing all queries.