#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>

//#ifdef LOCAL
//#define eprintf(...) fprintf(stderr, __VA_ARGS__)
//#else
//#define NDEBUG
//#define eprintf(...) do {} while (0)
//#endif
#include<cassert>

using namespace std;

typedef long long LL;
typedef vector<int> VI;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i##_end;++i)

template<class T> inline void amin(T &x, const T &y) { if (y<x) x=y; }
template<class T> inline void amax(T &x, const T &y) { if (x<y) x=y; }
template<class Iter> void rprintf(const char *fmt, Iter begin, Iter end) {
    for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); }
    putchar('\n');
}
template<unsigned MOD> struct ModInt {
    static const unsigned static_MOD = MOD;
    unsigned x;
    void undef() { x = (unsigned)-1; }
    bool isnan() const { return x == (unsigned)-1; }
    inline int geti() const { return (int)x; }
    ModInt() { x = 0; }
    ModInt(const ModInt &y) { x = y.x; }
    ModInt(int y) { if (y<0 || (int)MOD<=y) y %= (int)MOD; if (y<0) y += MOD; x=y; }
    ModInt(unsigned y) { if (MOD<=y) x = y % MOD; else x = y; }
    ModInt(long long y) { if (y<0 || MOD<=y) y %= MOD; if (y<0) y += MOD; x=y; }
    ModInt(unsigned long long y) { if (MOD<=y) x = y % MOD; else x = y; }
    ModInt &operator+=(const ModInt y) { if ((x += y.x) >= MOD) x -= MOD; return *this; }
    ModInt &operator-=(const ModInt y) { if ((x -= y.x) & (1u<<31)) x += MOD; return *this; }
    ModInt &operator*=(const ModInt y) { x = (unsigned long long)x * y.x % MOD; return *this; }
    ModInt &operator/=(const ModInt y) { x = (unsigned long long)x * y.inv().x % MOD; return *this; }
    ModInt operator-() const { return (x ? MOD-x: 0); }

    ModInt inv() const {
	unsigned a = MOD, b = x; int u = 0, v = 1;
	while (b) {
	    int t = a / b;
	    a -= t * b; swap(a, b);
	    u -= t * v; swap(u, v);
	}
	if (u < 0) u += MOD;
	return ModInt(u);
    }
    ModInt pow(long long y) const {
	ModInt b = *this, r = 1;
	if (y < 0) { b = b.inv(); y = -y; }
	for (; y; y>>=1) {
	    if (y&1) r *= b;
	    b *= b;
	}
	return r;
    }
    friend ModInt operator+(ModInt x, const ModInt y) { return x += y; }
    friend ModInt operator-(ModInt x, const ModInt y) { return x -= y; }
    friend ModInt operator*(ModInt x, const ModInt y) { return x *= y; }
    friend ModInt operator/(ModInt x, const ModInt y) { return x *= y.inv(); }
    friend bool operator<(const ModInt x, const ModInt y) { return x.x < y.x; }
    friend bool operator==(const ModInt x, const ModInt y) { return x.x == y.x; }
    friend bool operator!=(const ModInt x, const ModInt y) { return x.x != y.x; }
};

const LL MOD = 1000000007;
//const LL MOD = 998244353;
typedef ModInt<MOD> Mint;

const int MAX = 200000;
Mint inv[MAX+1], fact[MAX+1], fact_inv[MAX+1];
Mint C[205][205];

void init() {
    inv[1] = 1;
    for (int i=2; i<=MAX; i++) inv[i] = inv[MOD%i] * (MOD-MOD/i);

    fact[0] = fact_inv[0] = 1;
    for (int i=1; i<=MAX; i++) {
	fact[i] = fact[i-1] * i;
	fact_inv[i] = fact_inv[i-1] * inv[i];
    }

    C[0][0] = 1;
    for (int i=1; i<205; i++) {
	C[i][0] = 1;
	for (int j=1; j<=i; j++) C[i][j] = C[i-1][j-1] + C[i-1][j];
    }
}

Mint nCk(int n, int k) {
    return C[n][k];
//    return fact[n] * fact_inv[k] * fact_inv[n-k];
}

int N;
int X;
int S[211];
int Xb[100011];
VI Xs;

Mint dp[2][205][100011];

void MAIN() {
    init();
    scanf("%d%d", &N, &X);
    REP (i, N) scanf("%d", S+i);
    sort(S, S+N);
    reverse(S, S+N);

    memset(Xb, -1, sizeof Xb);
    Xb[X] = 0;
    for (int i=X; i>0; i--) if (Xb[i] == 0) {
	REP (j, N) Xb[i % S[j]] = 0;
    }
    REP (i, X+1) if (Xb[i] == 0) {
	Xb[i] = Xs.size();
	Xs.push_back(i);
    }
//    rprintf("%d", Xs.begin(), Xs.end());
//    rprintf("%d", Xb, Xb+X+1);

    int cur = 0, nxt = 1;
    dp[0][0][Xb[X]] = 1;
    REP (i, N) {
	REP (j, N) memset(dp[nxt][j], 0, sizeof (Mint) * Xs.size());

	REP (j, N) REP (v, Xs.size()) if (dp[cur][j][v].x) {
	    dp[nxt][j+1][v] += dp[cur][j][v];
	    int w = Xb[Xs[v] % S[i]];
	    dp[nxt][0][w] += dp[cur][j][v] * nCk(N-i-1 + j, j) * fact[j];
	}
	swap(cur, nxt);
    }

    Mint ans = 0;
    Mint cnt = 0;
    REP (v, Xs.size()) {
	ans += dp[cur][0][v] * Xs[v];
	cnt += dp[cur][0][v];
    }
    printf("%d\n", ans.geti());
    if (cnt != fact[N]) for(;;);
//    eprintf("%d\n", cnt.geti());
}

int main() {
    int TC = 1;
//    scanf("%d", &TC);
    REP (tc, TC) MAIN();
    return 0;
}



Measured memory_bytes: 163456