#include <bits/stdc++.h>
#define P 1000000007
#define int long long

using namespace std;

int n, S[233], F[2][100010], C[233][233], X;

signed main() {
	scanf("%lld%lld", &n, &X);
	for(int i = 0; i <= n; i++)
		for(int j = 0; j <= n; j++)
			C[i][j] = !j ? 1 : (C[i - 1][j - 1] + C[i - 1][j]) % P;
	for(int i = 1; i <= n; i++) scanf("%lld", &S[i]);
	sort(S + 1, S + n + 1);
	reverse(S + 1, S + n + 1);
	int a = 0, b = 1;
	F[0][X] = 1;
	for(int i = 1; i <= n; i++, swap(a, b)) {
		memset(F[b], 0, sizeof F[b]);
		for(int j = 0; j <= X; j++) {
			int t = j % S[i];
			F[b][t] = (F[b][t] + F[a][j]) % P;
			F[b][j] = (F[b][j] + F[a][j] * (n - i)) % P;
		}
	}
	int ans = 0;
	for(int i = 1; i <= X; i++) ans = (ans + i * F[a][i]) % P;
	printf("%d\n", (ans % P + P) % P);
	return 0;
}