While the defenders were distracted by Blaze, Corwin launched an assault on the city. In order for his army to enter the city, he needs to breach the wall. He has a whole fleet at his disposal, from which he is going to shell the walls of the city. The wall is a line of n
segments, numbered from 1
to n
.
Corwin remembers well how reinforced each segment of the wall is. Unfortunately, since Corwin was last in Amber, the segments have been rebuilt several times, so their fortification may have changed, so Corwin has outdated information.
But Gerard not only agreed to withdraw his fleet from the bay of Amber, thanks to which Corvin's fleet managed to reach Amber with the whole fleet intact, but also provided him with a log with m
entries, in which in i
-th entry indicates that the segments from li
to ri
were rebuilt, it also says how much the hardness of all segments has changed (the hardness of each segment on the segment [li; ri]
changes by the same value ti
) .
Corwin
m
times offers to shoot wall segments from
l
to
r
from
p
ships. It is known that a gap will be broken if on the segment
[l; r]
there is at least one segment with a hardness less than
p
. You must tell him whether a breach will be made (output "
YES
") or not (output "
NO
").
Input
The first line contains the numbers n
, m
and k
(1 <= n, k <= 100000, 1 < = m <= 10000) - the number of segments, entries and requests from Corwin respectively.
On the second line are the numbers a1
,..., a n
(0 <= ai <= 10).
The following m lines contain numbers l
, r
, t
( 1 <= l <= r <= n, -10 <= t <= 10).
The following
k
lines contain the numbers
l
,
r
,
p
(1 <= l < = r <= n, 1 <= p <= 1000).
Imprint
On the
i
-th line, print the answer to the
i
-th Corwin query.
Examples
# |
Input |
Output |
1 |
10 3 3
123 398 287 190 76 15 407 312 323 659
4 9 -99
10 10 -82
4 10 76
9 10 32
5 6 283
4 4 983
|
NO
YES
YES
|