#C8999. Can Split Rental Cost

    ID: 53042 Type: Default 1000ms 256MiB

Can Split Rental Cost

Can Split Rental Cost

Given an integer \(n\) representing the number of friends, an integer \(c\) representing the total rental cost, and a list of \(n\) contributions, determine whether the total contributions exactly match the cost \(c\).

If the sum of the contributions is equal to \(c\), output yes; otherwise, output no.

inputFormat

The input is read from standard input (stdin). The first line contains two integers (n) and (c), where (n) is the number of friends and (c) is the total rental cost. The second line contains (n) space-separated integers representing each friend's contribution.

outputFormat

Output to standard output (stdout) a single line containing yes if the sum of contributions equals (c), otherwise output no.## sample

4 240
60 60 60 60
yes