She says that any Pavarotti among the nightingales will serenade his mate while she sits on her eggs.
She says that any excited database can answer the queries efficiently.
You are given the two dimensional database as a matrix $A$ with $n$ rows and $n$ columns. In the beginning, $A[i][j]=0$ for all $1\le i,j\le n$.
Then $q$ operations or queries will be given in turn.
You should maintain the database for two type of operations:
$\cdot$ $1~L~R$: for each element $A[i][j]$ which satisfy $L\le i+j\le R$, increase the value to $A[i][j]+1$, where $2\le L\le R\le 2n$.
$\cdot$ $2~L~R$: for each element $A[i][j]$ which satisfy $L\le i-j\le R$, increase the value to $A[i][j]+1$, where $1-n\le L\le R\le n-1$.
Meanwhile, you should answer the queries:
$\cdot$ $3~x_1~x_2~y_1~y_2$: count the value of elements $A[i][j]$ which satisfy $x_1\le i\le x_2$ and $y_1\le j\le y_2$, where $1\le x_1<x_2\le n$ and $1\le y_1<y_2\le n$.