History in Numbers

Algorithms and data structures find their place in various arts, crafts, and sciences.
In this problem, we are discussing one potential application in history.

Historians are studying the urban development of a city over a period of  years. The urban
development is quantified using an aggregate measure they call an urban development index (UDI), which
could take integer values, including negative. 
There is an initial estimation  of this index for each of the years. However, during the research process, due to
the new documents and evidence discovered, these estimates are revised and updated. More formally,
throughout the historians' work process, they could want to update the UDI estimates for 
all years between  and  (inclusive) by adding  to each of them.

The main question historians are interested in is if the UDI has been increasing over a certain
period of time. However, due to the noisy nature of estimates, we will not be using the standard definition.
Instead, the following procedure is used:
itemize
we collapse all consequent equal numbers into one. For instance, 1 1 2 2 2 3 3 3 becomes 1 2 3;
the UDI is considered increasing from year  to year  if the sequence of local minima in the
UDI sequence after the above transformation is
strictly increasing. An element  is considered to be a local minimum if it is less than both
of its neighbors (one neighbor for the first or last element).
itemize

You are to implement the system able to store the UDI estimates and process the requests to update
them and to check if the UDI has been increasing over a certain period.

Input
	itemize
One line containining an integer  () denoting the length of the time period being considered.
One line containing  space separated integers  ().
One line containing an integer number  ().
 further lines each describing one request in one of the following two formats:
itemize
update followed by three integers , , and  (, ). 
check followed by two integers  and  ().
itemize
	itemize

Output

For each check request output YES if the UDI has been increasing during the corresponding period 
and NO otherwise.
