#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define fi first
#define se second
#define mp make_pair
#define itrfor(itr,A) for(auto itr = A.begin(); itr !=A.end();itr++)
template <class T> using reversed_priority_queue = priority_queue<T, vector<T>, greater<T> >;
typedef long long llong;
char moji[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char moji2[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char moji3[10]={'0','1','2','3','4','5','6','7','8','9'};
#define Sort(a) sort(a.begin(),a.end());
#define Reverse(a) reverse(a.begin(),a.end());
#define print(a) cout << a << endl;
#define MOD llong(1e9+7)
#define MAX int(2 * 1e5 +5)
#define debug(x)  cout << #x << " = " << (x) << endl;
#define pi acos(-1.0)
#define int llong
#define INF llong(1e17)
template<class T> bool chmax(T &a,  T b) {if(a<b){a=b; return 1;} return 0;}
template<class T> bool chmin(T &a,  T b) {if(a>b){a=b; return 1;} return 0;}
bool Add(int &a,int b){a = (a + b) % MOD;}
void myprint(int* A,int A_num){
   REP(i,A_num) cout << A[i] << " ";
   cout << endl;
}

const int x_max = 100004;
const int n_max = 205;

signed main(){
    int n,x;
    cin >> n >> x;
    int A[n];
    REP(i,n) cin >> A[i];
    sort(A,A+n);

    int dp[2][x_max];
    REP(j,x_max) dp[0][j] = j % A[0];
    FOR(i,1,n){
        REP(j,x_max){
            dp[i%2][j] = 0;
            Add(dp[i%2][j],dp[(i-1)%2][j % A[i]]);
            Add(dp[i%2][j],i * dp[(i-1)%2][j]);
        }
    }
    cout << dp[(n-1)%2][x] << endl;

}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200 + 10, M = 100000 + 10;
const int mod = 1e9 + 7;
void add(ll &x,ll y){
    x += y;
    if(x>=mod) x -= mod;
}
ll qpow(ll n,ll k){
    ll res = 1;
    while(k){
        if(k&1) res = res * n % mod;
        n = n * n % mod;
        k >>= 1;
    }
    return res;
}
ll fac[N],inv[N];
ll push(int x,int y){
    return fac[x+y] * inv[x] % mod;
}
int a[N],n;
ll f[N][M];
ll calc(int i,int j){
    if(j<a[n]){
//        cout<<i<<' '<<j<<' '<<fac[n-i]*j<<endl;
        return fac[n-i] * j % mod;
    }
    ll &ans = f[i][j];
    if(ans!=-1) return f[i][j];
    ans = 0;
    int x = 0, y = 0;
    for(int k=i+1;k<=n;k++){
        if(a[k]<=j){
//            cout<<i<<','<<j<<','<<k<<','<<calc(k,j%a[k])*push(n-k,y)%mod*push(n-i-x,x)%mod<<endl;
            add(ans,calc(k,j%a[k])*push(n-k,y)%mod*push(n-i-x,x)%mod);
        }
        if(a[k]<=j) y++;
        else x++;
    }
//    cout<<i<<' '<<j<<' '<<ans<<endl;
    return ans;
}
int main(){
    fac[0] = 1; for(int i=1;i<N;i++) fac[i] = fac[i-1] * i % mod;
    inv[N-1] = qpow(fac[N-1],mod-2);
    for(int i=N-2;i>=0;i--) inv[i] = inv[i+1] * (i + 1) % mod;
    ios::sync_with_stdio(0);
    int x; cin>>n>>x;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+1+n,greater<int>());
    memset(f,-1,sizeof(f));
    cout<<calc(0,x)<<endl;
}
