// Dmitry _kun_ Sayutin (2019)

#include <bits/stdc++.h>

using std::cin;
using std::cout;
using std::cerr;

using std::vector;
using std::map;
using std::array;
using std::set;
using std::string;

using std::pair;
using std::make_pair;

using std::tuple;
using std::make_tuple;
using std::get;

using std::min;
using std::abs;
using std::max;
using std::swap;

using std::unique;
using std::sort;
using std::generate;
using std::reverse;
using std::min_element;
using std::max_element;

#ifdef LOCAL
#define LASSERT(X) assert(X)
#else
#define LASSERT(X) {}
#endif

template <typename T>
T input() {
    T res;
    cin >> res;
    LASSERT(cin);
    return res;
}

template <typename IT>
void input_seq(IT b, IT e) {
    std::generate(b, e, input<typename std::remove_reference<decltype(*b)>::type>);
}

#define SZ(vec)         int((vec).size())
#define ALL(data)       data.begin(),data.end()
#define RALL(data)      data.rbegin(),data.rend()
#define TYPEMAX(type)   std::numeric_limits<type>::max()
#define TYPEMIN(type)   std::numeric_limits<type>::min()

const int mod = 1000 * 1000 * 1000 + 7;
int add(int a, int b) {
    return (a + b >= mod ? a + b - mod : a + b);
}

int sub(int a, int b) {
    return (a >= b ? a - b : mod + a - b);
}

int mult(int a, int b) {
    return (int64_t(a) * b) % mod;
}

int fpow(int a, int n, int r = 1) {
    while (n) {
        if (n % 2)
            r = mult(r, a);

        n /= 2;
        a = mult(a, a);
    }

    return r;
}

int fact[500];
int rfact[500];

const int max_n = 220;
const int max_s = 1.1e5;
//int dp[max_n][max_s];
int dp_sum[max_n][max_s];

int main() {
    std::iostream::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    fact[0] = 1;
    for (int i = 1; i < 500; ++i)
        fact[i] = mult(i, fact[i - 1]);

    for (int i = 0; i != 500; ++i)
        rfact[i] = fpow(fact[i], mod - 2);
    
    // code here
    int n = input<int>();
    int x = input<int>();

    vector<int> S(n);
    input_seq(ALL(S));
    sort(RALL(S));

    dp_sum[1 + (-1)][x] = fact[n - 2 - (-1)];

#define dp dp_sum
    
    for (int next = 0; next != n; ++next) {
        for (int val = max_s - 1; val >= 0; --val)
            dp[1 + next][val] = dp[next][val]; // sum
        
        for (int val = max_s - 1; val >= 0; --val) {
            int& to = dp[1 + next][val % S[next]];

            to = add(to, mult(dp[next][val], mult(rfact[n - 1 - next], (next == n - 1 ? 1 : fact[n - 2 - next]))));
        }
    }
    
    // for (int last = -1; last != n; ++last)
    //     for (int next = last + 1; next != n; ++next) {
    //         for (auto dp_val: dp[1 + last]) {
    //             int& to = dp[1 + next][dp_val.first % S[next]];

    //             int rem = n - 1 - next;
    //             int k = next - last - 1;

    //             // fact[n - 2 - last] div fact[n - 1 - next] 
                
    //             to = add(to, mult(dp_val.second, mult(fact[k], C[rem + k][k])));
    //         }
    //     }


    int res = 0;
    for (int val = max_s - 1; val >= 0; --val) {
        res = add(res, mult(val, sub(dp[1 + (n - 1)][val], dp[0 + (n - 1)][val])));
    }

    cout << res << "\n";
            
            
    return 0;
}


Measured memory_bytes: 87936