You are given an array of N integers. You are required to answer 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 .
Constraints