N, A = list(map(int, input().split(' ')))



X = list(map(int, input().split(' ')))

X = [x - A for x in X]



from collections import defaultdict

counter = defaultdict(int)

counter[0] = 1



for x in X:

	copy = dict(counter)

	for d,c in list(copy.items()):

		counter[d+x] += c



print((counter[0]-1))


from collections import defaultdict

N, A = list(map(int, input().split()))



X = [int(s) - A for s in input().split()]



counter = defaultdict(int)

counter[0] = 1



for x in X:

  for d,c in list(counter.items()):

    counter[d+x] += c



print((counter[0]-1))
N, A = list(map(int, input().split(" ")))
X = list(map(int, input().split(" ")))
X = [x - A for x in X]
from collections import defaultdict

counter = defaultdict(int)
counter[0] = 1
for x in X:
    copy = dict(counter)
    for d, c in list(copy.items()):
        counter[d + x] += c
print((counter[0] - 1))

from collections import defaultdict

N, A = list(map(int, input().split()))
X = [int(s) - A for s in input().split()]
counter = defaultdict(int)
counter[0] = 1
for x in X:
    for d, c in list(counter.items()):
        counter[d + x] += c
print((counter[0] - 1))

-N, A = list(map(int, input().split(" "))) -X = list(map(int, input().split(" "))) -X = [x - A for x in X] +N, A = list(map(int, input().split())) +X = [int(s) - A for s in input().split()] -    copy = dict(counter) -    for d, c in list(copy.items()): +    for d, c in list(counter.items()):