Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

That's 1 Minute See You Tomorrow

By oasis.cse · Limits 1s, 512 MB

You may heard the name of Nas Daily, a Facebook page by a travel video blogger Nuseir Yassin. He creates 1-minute videos of people daily or about facts from various countries.

Nas takes many video clips and highlights the important thing of a clip. Nas takes N shots of L seconds length and from every video clip takes M seconds as the important part. Finally, Nas creates an exactly 1 minute long video merging the important parts from each video clip.

Input

The first line of input contains two integer N (0 < N < 1000), denoting the number of shots and M (0 < M < 1000) seconds taken from every clip.

The next line contains N integers L1, L2, …, LN (0 < Li < 1000), the length of clips.

Output

Print “YES” (w/o quotes) if it is possible to make an 1 minute long video taking M seconds from every video clip. Otherwise print “NO”.

Sample

InputOutput
3 20
30 30 30
YES


    Discussion
    Statistics

    76% Solution Ratio

    dhruba_1603088Earliest, Dec '18

    dhruba_1603088Fastest, 0.0s

    Annabelle_Lightest, 0 B

    mdvirusShortest, 126B

    Submit

    Login to submit