#include <bits/stdc++.h>
using namespace std;
const int maxn = 205;
int a[maxn];
const int mod = 1000000007;
int dp[2][105][51005];
const int mm = 51005;
vector<int> g[2];
int vis[mm];
int main() {
  int i, j, n, k;
  cin >> n >> k;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  int u = 0;
  dp[u][0][k] = 1;
  for (i = 1; i <= n; i++) {
    u = u ^ 1;
    for (j = 0; j <= min(i - 1, n - i + 1); j++) {
      for (int f = 0; f < mm; f++) {
        if (dp[u ^ 1][j][f] == 0) continue;
        if (f + a[i] < mm) {
          dp[u][j + 1][f + a[i]] += dp[u ^ 1][j][f];
          dp[u][j + 1][f + a[i]] %= mod;
        }
        dp[u][j][f] += ((long long)dp[u ^ 1][j][f] * (j + 1)) % mod;
        dp[u][j][f] %= mod;
        if (j) {
          if (f >= a[i]) {
            dp[u][j - 1][f - a[i]] += ((long long)j * dp[u ^ 1][j][f]) % mod;
            dp[u][j - 1][f - a[i]] %= mod;
          }
        }
        dp[u ^ 1][j][f] = 0;
      }
    }
  }
  int s = 0;
  for (int j = 0; j < mm; j++) {
    s += dp[u][0][j];
    s %= mod;
  }
  cout << s << endl;
}
