#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
void add0(int& x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  vector<vector<int> > d(n / 2 + 1, vector<int>(k + 1));
  d[0][0] = 1;
  for (int it = 1; it < a.size(); ++it) {
    vector<vector<int> > nd(d.size(), vector<int>(d[0].size()));
    for (int i = 0; i < d.size(); ++i) {
      int add = i * (a[it] - a[it - 1]);
      for (int j = 0; j + add < d[i].size(); ++j)
        nd[i][j + add] = (i + 1) * (long long)d[i][j] % mod;
    }
    for (int i = 0; i + 1 < d.size(); ++i) {
      int add = i * (a[it] - a[it - 1]);
      for (int j = 0; j + add < d[i].size(); ++j)
        add0(nd[i + 1][j + add], d[i][j]);
    }
    for (int i = 1; i < d.size(); ++i) {
      int add = i * (a[it] - a[it - 1]);
      for (int j = 0; j + add < d[i].size(); ++j)
        add0(nd[i - 1][j + add], i * (long long)d[i][j] % mod);
    }
    d.swap(nd);
  }
  long long res = 0;
  for (int i = 0; i < d[0].size(); ++i) res += d[0][i];
  cout << res % mod << endl;
  return 0;
}
