Pari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The price of the chocolate is k, so Pari will take a subset of her coins with sum equal to k and give it to Arya.

Looking at her coins, a question came to her mind: after giving the coins to Arya, what values does Arya can make with them? She is jealous and she doesn't want Arya to make a lot of values. So she wants to know all the values x, such that Arya will be able to make x using some subset of coins with the sum k.

Formally, Pari wants to know the values x such that there exists a subset of coins with the sum k such that some subset of this subset has the sum x, i.e. there is exists some way to pay for the chocolate, such that Arya will be able to make the sum x using these coins.

Input

The first line contains two integers n and k (1 ≤ n, k ≤ 500) — the number of coins and the price of the chocolate, respectively.

Next line will contain n integers c1, c2, ..., cn (1 ≤ ci ≤ 500) — the values of Pari's coins.

It's guaranteed that one can make value k using these coins.

Output

First line of the output must contain a single integer q— the number of suitable values x. Then print q integers in ascending order — the values that Arya can make for some subset of coins of Pari that pays for the chocolate.

Examples

Input

6 18
5 6 1 10 12 2


Output

16
0 1 2 3 5 6 7 8 10 11 12 13 15 16 17 18 


Input

3 50
25 25 50


Output

3
0 25 50

Difficulty: HARD

Solutions:
from sys import stdin, stdout
(n, m) = map(int, input().split())
s = [0] + list(map(int, stdin.readline().strip().split()))
dp = [[[False for i in range(m + 1)] for j in range(m + 1)] for k in range(2)]
dp[0][0][0] = True
cur = 0
for i in range(1, n + 1):
	cur += 1
	cur %= 2
	last = (cur + 1) % 2
	for j in range(m + 1):
		for k in range(j + 1):
			if j - s[i] > -1 and k - s[i] > -1:
				dp[cur][j][k] = dp[last][j][k] or dp[last][j - s[i]][k] or dp[last][j - s[i]][k - s[i]]
			elif j - s[i] > -1:
				dp[cur][j][k] = dp[last][j][k] or dp[last][j - s[i]][k]
			elif k - s[i] > -1:
				dp[cur][j][k] = dp[last][j][k] or dp[last][j - s[i]][k - s[i]]
			else:
				dp[cur][j][k] = dp[last][j][k]
n1 = 0
ans = ''
for i in range(k + 1):
	if dp[cur][k][i]:
		ans += str(i) + ' '
		n1 += 1
stdout.write(str(n1) + chr(10))
stdout.write(ans)


read = lambda : map(int, input().split())
(n, k) = read()
c = list(read())
dp = [0] * (k + 1)
dp[0] = 1
for x in c:
	ndp = dp[:]
	for i in range(k, x - 1, -1):
		ndp[i] |= dp[i - x] | dp[i - x] << x
	dp = ndp
b = bin(dp[-1])
ans = [i for i in range(k + 1) if b[-i - 1] == '1']
print(len(ans))
print(*ans)