Sometimes long stories are very boring. So we decided to make statement as short as possible!
You have two integer arrays of size n: X and P. Your task is to perform q queries. There are three types of queries:
Input format
The first line of input contains two space separated integers n and q (1≤n,q≤3⋅105) - size of arrays and number of queries.
The second line of input contains n space separated integers Xi (−109≤Xi≤109).
The third line of input contains n space separated integers Pi (−109≤Pi≤109).
Then q lines follow. The i-th of them contains parameters of the i-th query.
The i-th line can be:
Output format
For each third type query print the answer for it.
max{1+min(0,2),3+min(−1,1),0+min(10,2)}=2
max{1+min(0,2),3+min(5,1),1+min(10,2)}=4