You are given an integer sequence a_0,a_1,…,a_N−1.
You have to perform Q queries, each query is one of the following:
l r x: for each i between l and r inclusively, a_i=a_i+x.l r x: for each i between l and r inclusively a_i=floor(a_i/x), where floor(y) is the biggest integer that is not greater than y.l r x=0: print max(a_l,a_l+1,…,a_r).Input is given in the following format:
N Q
a_0 a_1 ... a_N−1
t_1 l_1 r_1 x_1
t_2 l_2 r_2 x_2
…
t_Q l_Q r_Q x_Q
For each MAX query, print max(a_l,a_l+1,...,a_r).
All input values are integers, 1≤N,Q≤200,000, 0≤a_i≤108, t_i=0,1,2, 0≤l_i≤r_i≤N−1, 1≤x_i≤1000 if t_i=2, x_i=0 if t_i=2.
For Sample 1,
max(1,2,3,4,5)=5
1,2,3,4,5→11,12,3,4,5
max(11,12,3,4,5)=12
max(3)=3
11,12,3,4,5→2,3,3,4,5
max(2)=2
max(3)=3