A - Content Too Large Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 100

問題文

高橋くんは、N 個の品物と 1 つのカバンを持っています。

i 番目 (1\le i\le N) の品物の大きさは A _ i で、カバンの大きさは M です。

カバンに入れようとしている品物の大きさの合計が M 以下のとき、かつそのときに限り、それらの品物をすべて同時にカバンに入れることができます。

高橋くんが N 個の品物すべてを同時にカバンに入れることができるなら Yes 、そうでなければ No と出力してください。

制約

  • 1\le N\le100
  • 1\le M\le10000
  • 1\le A _ i\le100\ (1\le i\le N)
  • 入力はすべて整数

入力

入力は以下の形式で標準入力から与えられる。

N M
A _ 1 A _ 2 \ldots A _ N

出力

高橋くんがすべての品物を同時にカバンに入れられるなら Yes を、そうでなければ No を出力せよ。


入力例 1

5 15
3 1 4 1 5

出力例 1

Yes

5 つの品物の大きさの合計は 3+1+4+1+5=14 です。 これは、カバンの大きさ 15 以下なので、高橋くんはすべての品物を同時にカバンに入れることができます。 なので、Yes を出力してください。


入力例 2

5 5
3 1 4 1 5

出力例 2

No

5 つの品物の大きさの合計は 14 で、カバンの大きさ 5 より大きいため、高橋くんはすべての品物を同時にカバンに入れることができません。 なので、No を出力してください。


入力例 3

1 10000
100

出力例 3

Yes

Score : 100 points

Problem Statement

Takahashi has N items and one bag.

The size of the i-th (1\le i\le N) item is A_i, and the size of the bag is M.

If and only if the total size of the items he is trying to put in the bag is at most M, he can put all those items in the bag simultaneously.

If he can put all N items in the bag simultaneously, print Yes; otherwise, print No.

Constraints

  • 1\le N\le100
  • 1\le M\le10000
  • 1\le A_i\le100\ (1\le i\le N)
  • All input values are integers.

Input

The input is given from standard input in the following format:

N M
A_1 A_2 \ldots A_N

Output

If Takahashi can put all items in the bag simultaneously, print Yes; otherwise, print No.


Sample Input 1

5 15
3 1 4 1 5

Sample Output 1

Yes

The total size of the 5 items is 3+1+4+1+5=14. Since this is not greater than the bag size 15, Takahashi can put all items in the bag simultaneously. Thus, print Yes.


Sample Input 2

5 5
3 1 4 1 5

Sample Output 2

No

The total size of the 5 items is 14, which is greater than the bag size 5, so he cannot put all items in the bag simultaneously. Thus, print No.


Sample Input 3

1 10000
100

Sample Output 3

Yes