You're in a field, which can be represented by $$$n + 1$$$ cells numbered from $$$0$$$ to $$$n$$$. The state of the field can be represented by a sequence of $$$n$$$ integers $$$a_1, a_2, ..., a_n$$$. For all $$$i$$$, if $$$a_i \gt 0$$$, then cell $$$i$$$ contains a watermelon worth $$$a_i$$$ health. Otherwise, if $$$a_i = 0$$$, then cell $$$i$$$ is empty. Cell $$$0$$$ is always empty. Initially, you're located in cell $$$0$$$ and have $$$h$$$ health.
In each minute, the following will occur in order:
Please determine if it's possible for you to reach cell $$$n$$$ without starving. It doesn't count if you starve in the last minute.
The first line of input consists of two space-separated integers $$$n$$$ and $$$h$$$ $$$(1 \leq n, h \leq 2 \cdot 10^5)$$$.
The second line of input consists of $$$n$$$ space-separated integers $$$a_1, a_2, ..., a_n$$$ $$$(0 \leq a_i \leq 2 \cdot 10^5)$$$.
On the first and only line, output YES if it's possible for you to reach cell $$$n$$$ without starving. Otherwise, output NO.
10 3 1 1 1 0 0 0 0 0 0 0
YES
11 3 1 1 1 0 0 0 0 0 0 0 0
NO
1 1 1
YES
One possible path to cell $$$n$$$ for the first sample test case looks like this:
It can be proven that it is impossible to reach cell $$$n$$$ without starving in the second test case.