Fall loves playing games and collecting strange achievements in games. If he doesn't pass a level with full stars, he will feel uncomfortable.
Today, Fall is playing a new game. The game includes $n$ levels without order, which means you can play the levels in any order. However, each level can only be challenged once. During the challenge, Fall may get hurt or pick up rare items. Assuming that before he challenges level $i$, he has power $x$, and after he challenges this level, his power will be increased by $d_i$. After that, if his power is higher than or equal to $s_i$, he will get a full star in this level.
Initially, Fall has power $s_0$ , he wants to find a challenge order that he can get full star levels as more as possible.