#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>

using namespace std;

const long long mod = 1e9 + 7;

long long dp[201][100001];
long long N, X;
long long S[201];

int main()
{
    cin >> N >> X;
    for (int i = 0;i < N;i++)
    {
        cin >> S[i];
    }
    sort(S, S+N, greater<long long>());
    dp[0][X] = 1;
    for (long long i = 1; i <= N; i++)
    {
        for (long long j = 0; j <= X;j++)
        {
            dp[i][j % S[i - 1]] += dp[i - 1][j];
            dp[i][j % S[i - 1]] %= mod;
            dp[i][j] += dp[i - 1][j] * (N - i);
            dp[i][j] %= mod;
        }
    }
    long long ans = 0;
    for (long long i = 0; i <= X;i++)
    {
        ans += i * dp[N][i];
        ans %= mod;
    }
    cout << ans << endl;
    return 0;
}