#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int dp[2][105][11005], a[205];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  int mid = 10000;
  int pv = 0, nt = 1;
  dp[0][0][mid] = 1;
  for (int i = 1; i <= n; i++) {
    memset(dp[nt], 0, sizeof(dp[nt]));
    for (int j = 0; j <= 100; j++) {
      for (int l = 0; l <= 11000; l++) {
        if (dp[pv][j][l] == 0) continue;
        if (j > 0 && l + a[i] <= mid + k)
          dp[nt][j - 1][l + a[i]] =
              (dp[nt][j - 1][l + a[i]] + dp[pv][j][l] * 1ll * j) % mod;
        if (j + 1 <= 100 && l - a[i] >= 0)
          dp[nt][j + 1][l - a[i]] =
              (dp[nt][j + 1][l - a[i]] + dp[pv][j][l]) % mod;
        if (j > 0) dp[nt][j][l] = (dp[nt][j][l] + dp[pv][j][l] * 1ll * j) % mod;
        dp[nt][j][l] = (dp[nt][j][l] + dp[pv][j][l]) % mod;
      }
    }
    swap(pv, nt);
  }
  int ans = 0;
  for (int j = mid; j <= mid + k; j++) ans = (ans + dp[pv][0][j]) % mod;
  printf("%d\n", ans);
}
