# Practice on Toph

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

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

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.

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 **L _{1}**,

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”.

Input | Output |
---|---|

3 20 30 30 30 | YES |

77% Solution Ratio

dhruba_1603088Earliest,

dhruba_1603088Fastest, 0.0s

Annabelle_Lightest, 0 B

mdgaziur001Shortest, 117B

Login to submit