#abc265b. [abc265_b]Explore

[abc265_b]Explore

Problem Statement

Takahashi is exploring a cave in a video game.

The cave consists of NN rooms arranged in a row. The rooms are numbered Room 1,2,ldots,N1,2,\\ldots,N from the entrance.

Takahashi is initially in Room 11, and the time limit is TT.
For each 1leqileqN11 \\leq i \\leq N-1, he may consume a time of AiA_i to move from Room ii to Room (i+1)(i+1). There is no other way to move between rooms. He cannot make a move that makes the time limit 00 or less.

There are MM bonus rooms in the cave. The ii-th bonus room is Room XiX_i; when he arrives at the room, the time limit increases by YiY_i.

Can Takahashi reach Room NN?

Constraints

  • 2leqNleq1052 \\leq N \\leq 10^5
  • 0leqMleqN20 \\leq M \\leq N-2
  • 1leqTleq1091 \\leq T \\leq 10^9
  • 1leqAileq1091 \\leq A_i \\leq 10^9
  • 1<X1<ldots<XM<N1 < X_1 < \\ldots < X_M < N
  • 1leqYileq1091 \\leq Y_i \\leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN MM TT A1A_1 A2A_2 ldots\\ldots AN1A_{N-1} X1X_1 Y1Y_1 X2X_2 Y2Y_2 vdots\\vdots XMX_M YMY_M

Output

If Takahashi can reach Room NN, print Yes; otherwise, print No.


Sample Input 1

4 1 10
5 7 5
2 10

Sample Output 1

Yes
  • Takahashi is initially in Room 11, and the time limit is 1010.
  • He consumes a time of 55 to move to Room 22. Now the time limit is 55. Then, the time limit increases by 1010; it is now 1515.
  • He consumes a time of 77 to move to Room 33. Now the time limit is 88.
  • He consumes a time of 55 to move to Room 44. Now the time limit is 33.

Sample Input 2

4 1 10
10 7 5
2 10

Sample Output 2

No

He cannot move from Room 11 to Room 22.