#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <list>
#include <iterator>
#pragma warning(disable:4996)
 
typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF 9223300000000000000
#define INF 2140000000
#define MOD 1000000007
using namespace std;



const long max_comb=300;
vector<ll> fac(max_comb+1); //n! (mod M)
vector<ll> ifac(max_comb+1); //k!^(-1) (mod M)

ll mpow(ll x, ll n){ //x^n(mod M)
    ll ans = 1;
    while(n != 0){
        if(n&1) ans = ans*x % MOD;
        x = x*x % MOD;
        n = n >> 1;
    }
    return ans;
}

ll minv(ll x){
    return mpow( x, MOD-2 );
}

ll comb(long a, long b){     // C(a,b) = a! * b!^(-1) * (a-b)^(-1)
    if(a == 0 && b == 0)return 1;
    if(a < b || a < 0)return 0;
    ll tmp = ifac[a-b]* ifac[b] % MOD;
    return tmp * fac[a] % MOD;
}

ll perm(long a, long b){     // P(a,b) = a! * (a-b)!^(-1)
    if(b == 0)return 1;
    if(a < b || a < 0)return 0;
    ll tmp = ifac[a-b] % MOD;
    return tmp * fac[a] % MOD;
}

void pre_comb()
{
    fac[0] = 1;
    ifac[0] = 1;
    for(long i = 0; i<max_comb; i++){
        fac[i+1] = fac[i]*(i+1) % MOD; // n!(mod M)
        ifac[i+1] = ifac[i]*minv(i+1) % MOD; // k!^(-1) (mod M)
    }
    return;
}



ll dp[205][100005];

int main(int argc, char* argv[])
{
    long n, x;
    scanf("%ld%ld", &n, &x);

    vector<long> s(n);
    long i,j;
    for(i=0; i<n; i++) {
        scanf("%ld", &s[i]);
    }
    sort(s.rbegin(), s.rend());

    pre_comb();

    dp[0][x]=1;
    for(i=0; i<n; i++) {
        for(j=0; j<=x; j++) {
            if(dp[i][j]) {
                ll tmp = minv(n-i);
                dp[i+1][j] = (dp[i+1][j] + (dp[i][j]* (1+MOD-tmp)))%MOD;
                dp[i+1][j%s[i]] = (dp[i+1][j%s[i]] + dp[i][j]* tmp)%MOD;
            }
        }
    }

    ll ans=0;
    for(i=0; i<s[n-1]; i++) {
        ans = (ans + i*dp[n][i])%MOD;
    }
    ans = (ans * perm(n,n))%MOD;
    printf("%lld\n", ans);

    return 0;
}

#include <bits/stdc++.h>
#include <cassert>
typedef long long int ll;
using namespace std;

#define DEBUG 0

#if DEBUG
  #define DLOG(...) fprintf(stderr, __VA_ARGS__)
#else
  #define DLOG(...)
#endif

void debug(auto f) {
#if DEBUG
  f();
#endif
}

ll mPrime = int(1e9) + 7;
ll bN, bX;
vector<ll> bS;
vector<ll> facts;
vector<ll> invFacts;
vector<int> tbl;
vector<int> low;  // low[y] == #{ i | s[i] <= y }

ll mAdd(ll x, ll y) {
  ll z = x + y;
  if (z < mPrime)  return z;
  else             return (z - mPrime);
}

ll mSub(ll x, ll y) {
  ll z = x - y;
  if (z >= 0)  return z;
  else         return (z + mPrime);
}

ll mMul(ll x, ll y) {
  return (x * y) % mPrime;
}

ll eGCD(ll a, ll b, ll& s, ll& t) {
  if (a == 0) {
    s = 0;
    t = 1;
    return b;
  }
  ll u;
  ll g = eGCD(b % a, a, t, u);
  s = u - (b / a) * t;
  return g;
}

ll mInv(ll x) {
  ll s, t;
  eGCD(x, mPrime, s, t);
  return s < 0 ? s + mPrime : s;
}


ll tight(ll);

ll loose(ll y, ll len) {
  ll result = mMul(tight(y), mMul(facts.at(len), invFacts.at(low.at(y))));
  DLOG("loose(%lld, %lld) = %lld\n", y, len, result);
  return result;
}

ll tight(ll y) {
  if (tbl.at(y) >= 0)  return tbl.at(y);
  ll len = low.at(y);
  if (len == 0)  return y;
  ll result = 0;
  for (ll i = 0; i < len; i++) {
    ll z = y % bS.at(i);
    result = mAdd(result, loose(z, len-1));
  }
  tbl.at(y) = result;
  DLOG("tight(%lld) = %lld\n", y, result);
  return result;
}

int main() {
  cin >> bN >> bX;
  bS.resize(bN);
  for (ll i = 0; i < bN; i++) {
    cin >> bS.at(i);
  }
  facts.resize(bN+1);
  invFacts.resize(bN+1);
  facts.at(0) = invFacts.at(0) = 1;
  for (ll i = 1; i <= bN; i++) {
    facts.at(i) = mMul(i, facts.at(i-1));
    invFacts.at(i) = mInv(facts.at(i));
  }
  sort(bS.begin(), bS.end());

  low.resize(bX+1);
  ll idx = 0;
  for (ll i = 0; i < bX+1; i++) {
    if (idx < (ll) bS.size() && bS.at(idx) == i)  idx++;
    low.at(i) = idx;
  }

  tbl.resize(bX+1, -1);
  ll ans = loose(bX, bS.size());
  cout << ans << endl;

  return 0;
}

