You are given an array A of N integers. You are required to answer Q queries of the following types:
Function F(i,j) is defined as follows:
Note: Assume 1-based indexing.
Input format
Output format
For every query of type 1 in space-separated format, print the maximum possible value of function F.
Constraints
1≤N,Q≤3×1051≤A[i],V≤1061≤L≤R≤N1≤X≤N