#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
int add(ll a, ll b) {
return (a%mod + b%mod + 2*mod)%mod;
}
int mul(ll a, ll b) {
return ((a%mod) * (b%mod)) % mod;
}
const int N = 100 + 2, L = 1000 + 2;
int dp[N][N][L][5];
int a[N];
int n, l;
int rec(int i, int cmp, int sum, int end) {
if (sum > l || cmp < 0 || end > 2) return 0;
if (i == n) return cmp == 1 && end == 2;
int&ret = dp[i][cmp][sum][end];
if (~ret) return ret;
ret = 0;
int n_sum = sum + (a[i] - (i ? a[i - 1] : 0)) * (2 * cmp - end);
// insert comp
ret = add(ret, mul(rec(i + 1, cmp + 1, n_sum, end), cmp + 1 - end));
// insert and close
ret = add(ret, mul(rec(i + 1, cmp + 1, n_sum, end + 1), 2 - end));
// insert front, back => dont close
if (cmp)
ret = add(ret, mul(rec(i + 1, cmp, n_sum, end), 2 * cmp - end));
// insert front, back => close
if (cmp)
ret = add(ret, mul(rec(i + 1, cmp, n_sum, end + 1), 2 - end));
// merge 2
if (cmp >= 2)
ret = add(ret, mul(rec(i + 1, cmp - 1, n_sum, end), cmp - 1));
return ret;
}
inline void die() {
memset(dp, -1, sizeof(dp));
cin >> n >> l;
if (n == 1) return void(cout << "1\n");
for (int i = 0; i < n; ++i) cin >> a[i];
sort(a, a + n);
cout << rec(0,0,0,0) << "\n";
}
signed main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t = 1;
// cin >> t;
while (t--)
die();
}