#include <bits/stdc++.h>

using namespace std;

using ll = int_fast64_t;
constexpr ll llmax = INT_FAST64_MAX; // std::numeric_limits<int_fast64_t>::max()
constexpr ll llmin = INT_FAST64_MIN; // std::numeric_limits<int_fast64_t>::min()
using ull = uint_fast64_t;
constexpr ull ullmax = UINT_FAST64_MAX; // std::numeric_limits<uint_fast64_t>::max()

#define FOR(i, b, e) for (int i = (b); i < (e); ++i)
#define RFOR(i, b, e) for (int i = ((e) - 1); (b) <= i; --i)
#define REP(i, N) for (int i = 0; i < (N); ++i)
#define RREP(i, N) for (int i = ((N) - 1); 0 <= i; --i)
#define scanInt(x) int x; scanf("%d", &(x)); getchar();
#define scanLLInt(x) ll x; scanf("%lld", &(x)); getchar();
#define scanVecInt(A, N) vector<int> A(N); REP(i, N){scanf("%d", &(A[i])); getchar();}
#define scanVecLLInt(A, N) vector<ll> A(N); REP(i, N){scanf("%lld", &(A[i])); getchar();}

constexpr uint mod = 1000000007;

// modをとった和を返す
inline
uint modPlus(uint a, uint b){return (a + b) % mod;}

// modをとった差を返す
inline
uint modMinus(uint a, uint b){return (mod + a - b) % mod;}

// modをとった積を返す
inline
uint modMultiple(uint a, uint b){return (static_cast<long long>(a) * b) % mod;}

// 階乗数n!を最初に計算して、呼ばれた時に返す
class Factorial {
    std::vector<uint> table;
public:
    Factorial(uint max) : table(max) // max:テーブルのサイズ
    {
        if (max == 0) return;
        table[0] = 1;
        for (uint i = 1; i < max; ++i){
            table[i] = modMultiple(table[i - 1], i + 1);
        }
    }

    uint operator () (int n)
    {
        if (n < 0) return 0;
        if (n == 0) return 1;
        return table[n - 1];
    }
};

// max以下の全ての数nの逆数（逆元）n^(mod - 2)を最初に計算して、呼ばれた時に返す
class ModInverse {
    std::vector<uint> table;
public:
    ModInverse(uint max) // max: 使いたい引数nの最大
        : table(max)
    {
        for (int n = 1; n <= max; ++n){
            uint mod_minus_2 = mod - 2;
            vector<uint> temp_table(static_cast<uint>(floor(log2f(mod_minus_2))) + 1);
            temp_table[0] = n;
            for (uint i = 1; i < temp_table.size(); ++i){
                temp_table[i] = modMultiple(temp_table[i - 1], temp_table[i - 1]); // n ^ (2 ^ i)
            }
            table[n - 1] = 1;
            for (uint i = 0; mod_minus_2; ++i, mod_minus_2 >>= 1){
                if (!(mod_minus_2 & 1)) continue;
                table[n - 1] = modMultiple(table[n - 1], temp_table[i]);
            }
        }
    }
    uint operator () (uint n)
    {
        return table[n - 1];
    }
};

int main()
{
    scanInt(N);
    scanInt(X);
    scanVecInt(S, N);
    sort(S.begin(), S.end(), greater<int>());
    Factorial fact(N);
    ModInverse mod_inv(N);
    unordered_map<int, int> dp;
    dp.emplace(X % mod, fact(N));
    REP(n, N){
        unordered_map<int, int> dp_next;
        for (auto& e : dp){
            const int nextX = e.first % S[n];
            dp_next[nextX] = modPlus(dp_next[nextX], modMultiple(e.second, mod_inv(N - n)));
            if (n < N - 1){
                dp_next[e.first] = modPlus(dp_next[e.first], modMultiple(modMultiple(e.second, N - n - 1), mod_inv(N - n)));
            }
        }
        dp.swap(dp_next);
    }
    int result = 0;
    for (auto& e : dp){
        result = modPlus(result, modMultiple(e.first, e.second));
    }
    cout << result << endl;
}


Measured memory_bytes: 1352