n,a,*X=list(map(int,open(0).read().split()))

y=[a-x for x in X]

dp={0:1}

for i in y:

	for k,v in set(dp.items()):

		dp[i+k]=dp.get(i+k,0)+v

print((dp[0]-1))
n,a=list(map(int,input().split()))

y=[a-int(x) for x in input().split()]

dp={0:1}

for i in y:

	for k,v in list(dp.items()):

		dp[i+k]=dp.get(i+k,0)+v

print((dp[0]-1))
n, a, *X = list(map(int, open(0).read().split()))
y = [a - x for x in X]
dp = {0: 1}
for i in y:
    for k, v in set(dp.items()):
        dp[i + k] = dp.get(i + k, 0) + v
print((dp[0] - 1))

n, a = list(map(int, input().split()))
y = [a - int(x) for x in input().split()]
dp = {0: 1}
for i in y:
    for k, v in list(dp.items()):
        dp[i + k] = dp.get(i + k, 0) + v
print((dp[0] - 1))

-n, a, *X = list(map(int, open(0).read().split())) -y = [a - x for x in X] +n, a = list(map(int, input().split())) +y = [a - int(x) for x in input().split()] -    for k, v in set(dp.items()): +    for k, v in list(dp.items()):