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

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

X_MAX = max(max(X), -min(X))

NX = N * X_MAX

dp = [[[0] * (N+1)  for i in range(N+1)] for _ in range(NX * 2 + 1)]

dp[NX][0][0] = 1

for i in range(1, N+1):

    for j in range(0, i+1):

        for k in range(NX * 2 + 1):

            if k == NX and j == 0:

                dp[k][i][j] = 1

                continue

            dp[k][i][j] += dp[k][i-1][j]

            if 0 <= k - X[i-1] < NX * 2 + 1:

                dp[k][i][j] += dp[k-X[i-1]][i-1][j-1]



print((sum(dp[NX][N]) - 1))
N, A = list(map(int, input().split()))

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

X_MAX = max(max(X), -min(X))

NX = N * X_MAX

dp = [[0] * (X_MAX * (N+1) * 2 + 1)  for i in range(N+1)]

dp [0][NX] = 1

for i in range(1, N+1):

    for j in range(NX*2+1):

        dp[i][j] += dp[i-1][j]

        dp[i][j] += dp[i-1][j-X[i-1]]



print((dp[N][NX]-1))
N, A = list(map(int, input().split()))
X = list([int(x) - A for x in input().split()])
X_MAX = max(max(X), -min(X))
NX = N * X_MAX
dp = [[[0] * (N + 1) for i in range(N + 1)] for _ in range(NX * 2 + 1)]
dp[NX][0][0] = 1
for i in range(1, N + 1):
    for j in range(0, i + 1):
        for k in range(NX * 2 + 1):
            if k == NX and j == 0:
                dp[k][i][j] = 1
                continue
            dp[k][i][j] += dp[k][i - 1][j]
            if 0 <= k - X[i - 1] < NX * 2 + 1:
                dp[k][i][j] += dp[k - X[i - 1]][i - 1][j - 1]
print((sum(dp[NX][N]) - 1))

N, A = list(map(int, input().split()))
X = list([int(x) - A for x in input().split()])
X_MAX = max(max(X), -min(X))
NX = N * X_MAX
dp = [[0] * (X_MAX * (N + 1) * 2 + 1) for i in range(N + 1)]
dp[0][NX] = 1
for i in range(1, N + 1):
    for j in range(NX * 2 + 1):
        dp[i][j] += dp[i - 1][j]
        dp[i][j] += dp[i - 1][j - X[i - 1]]
print((dp[N][NX] - 1))

-dp = [[[0] * (N + 1) for i in range(N + 1)] for _ in range(NX * 2 + 1)] -dp[NX][0][0] = 1 +dp = [[0] * (X_MAX * (N + 1) * 2 + 1) for i in range(N + 1)] +dp[0][NX] = 1 -    for j in range(0, i + 1): -        for k in range(NX * 2 + 1): -            if k == NX and j == 0: -                dp[k][i][j] = 1 -                continue -            dp[k][i][j] += dp[k][i - 1][j] -            if 0 <= k - X[i - 1] < NX * 2 + 1: -                dp[k][i][j] += dp[k - X[i - 1]][i - 1][j - 1] -print((sum(dp[NX][N]) - 1)) +    for j in range(NX * 2 + 1): +        dp[i][j] += dp[i - 1][j] +        dp[i][j] += dp[i - 1][j - X[i - 1]] +print((dp[N][NX] - 1))