Under construction

Still being built. Things may change

Playlist

Interview

Time limit2sMemory limit1024 MB

Summary
Decide whether the first song can be playing at second T when the shuffle plays every song once per round in random order.
Level

Medium4 of 10

Topics
Dynamic programming, Implementation
Solved
No attempts yet

Statement

Vasya likes to listen to music from his favorite playlist while doing homework. The playlist has NN songs, and each song lasts an integer number of seconds.

Vasya used to listen to the songs in the same order, but he got bored quickly because he knew which song would come next. Luckily, his player has a shuffle feature. It changes the playback order randomly, but a song cannot start playing again until the whole playlist has been played. Now Vasya always listens with shuffle turned on.

Once, Vasya started the music to do homework, but he was distracted and returned only after TT seconds. He wonders whether his favorite song could be playing at that moment, and asked you for help.

A song is considered playing at time TT if it plays for at least the next second.

Input

The first line contains two integers NN and TT (1≤N≤1001 \le N \le 100, 0≤T<∑i=1Nli0 \le T < \sum_{i=1}^N l_i): the number of songs in the playlist and the number of seconds after which Vasya returned.

The second line contains NN integers lil_i (1≤li≤5001 \le l_i \le 500), the durations of the songs in seconds. The first song is Vasya's favorite.

Output

Print Yes if Vasya's favorite song can be playing at time TT, and No otherwise.

Examples2

  1. Example 1

    Input
    3 10
    3 5 7
    
    Expected output
    No
    
  2. Example 2

    Input
    4 5
    2 3 4 5
    
    Expected output
    Yes