Typical Query Problem
You are given two integers and and array consisting of integers. You are given queries of format . After each query, you have to:
subtract from all elements on a segment of array ;
tell whether there exist a
good
segment on the array . A segment is consideredgood
if and , where denotes the length of the segment and denotes the average value on segment .
Input
The first line of input contains four integers , (), (), ().
The second line of input contains integers () — given array .
The following lines contain three integers , (), () each — description of the queries.
Output
Print lines, each consisting of YES
, if there exists a good
segment , or NO
otherwise.
Examples
Scoring
( points): ;
( points): , ;
( points): , ;
( points): ;
( points): ;
( points): no additional restrictions.