#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
void print() { cout << endl; }
template <class Head, class... Tail>
void print(Head&& h, Tail&&... t) {
  if (sizeof...(t) == 0)
    cout << h;
  else
    cout << h << ' ';
  print(move(t)...);
}
const double EPS = 1e-9;
const long INF = 2147483647;
const long MOD = 1e+9 + 7;
int dy[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dx[] = {1, -1, 0, 0, 1, -1, -1, 1};
int main(void) {
  int N, A, X = 0, number, numbers[51] = {};
  long long dp[51][10000] = {};
  cin >> N >> A;
  for (int i = (1); i < (N + 1); i++) {
    cin >> number;
    chmax(X, number);
    numbers[i] = number - A;
  }
  chmax(X, A);
  for (int t = 0; t < (2 * N * X + 1); t++) {
    if (t == N * X)
      dp[0][t] = 1;
    else
      dp[0][t] = 0;
  }
  for (int j = (1); j < (N + 1); j++) {
    for (int t = 0; t < (2 * N * X + 1); t++) {
      if (t - numbers[j] < 0 || (t - numbers[j]) > 2 * N * X)
        dp[j][t] = dp[j - 1][t];
      else
        dp[j][t] = dp[j - 1][t] + dp[j - 1][t - numbers[j]];
      cout << dp[j][t] << ' ';
    }
    cout << endl;
  }
  print(dp[N][N * X] - 1);
  return 0;
}
