#include <iostream>
#include <cstdint>

template <uint32_t mod>
class modint{
    uint64_t value;
public:
    constexpr modint(const int64_t x=0) noexcept: value(x % mod + (x < 0 ? mod : 0)){ }
    constexpr explicit operator uint64_t() const noexcept{ return value; }
    constexpr modint inverse() const noexcept{ return pow(*this, mod-2); }
    constexpr bool operator==(const modint &rhs) const noexcept{ return value == rhs.value; }
    constexpr bool operator!=(const modint &rhs) const noexcept{ return value != rhs.value; }
    constexpr modint operator+() const noexcept{ return modint(*this); }
    constexpr modint operator-() const noexcept{ return modint(mod - value); }
    constexpr modint operator+(const modint &rhs) const noexcept{ return modint(*this) += rhs; }
    constexpr modint operator-(const modint &rhs) const noexcept{ return modint(*this) -= rhs; }
    constexpr modint operator*(const modint &rhs) const noexcept{ return modint(*this) *= rhs; }
    constexpr modint operator/(const modint &rhs) const noexcept{ return modint(*this) /= rhs; }
    constexpr modint &operator+=(const modint &rhs) noexcept{
        if((value += rhs.value) >= mod) value -= mod;
        return *this;
    }
    constexpr modint &operator-=(const modint &rhs) noexcept{ return *this += mod - rhs.value; }
    constexpr modint &operator*=(const modint &rhs) noexcept{
        if((value *= rhs.value) >= mod) value %= mod;
        return *this;
    }
    constexpr modint &operator/=(const modint &rhs) noexcept{ return *this *= rhs.inverse(); }
    constexpr modint operator++(int) noexcept{
        modint ret(*this);
        if((++value) >= mod) value -= mod;
        return ret;
    }
    constexpr modint operator--(int) noexcept{
        modint ret(*this);
        if((value += mod - 1) >= mod) value -= mod;
        return ret;
    }
    constexpr modint &operator++() noexcept{ return *this += 1; }
    constexpr modint &operator--() noexcept{ return *this -= 1; }
    friend std::ostream &operator<<(std::ostream &os, const modint<mod> &x){ return os << x.value; }
    friend std::istream &operator>>(std::istream &is, modint<mod> &x){
        int64_t i;
        is >> i;
        x = modint<mod>(i);
        return is;
    }
    friend constexpr modint<mod> pow(const modint<mod> &x, const uint64_t &y){
        if(y == 0) return 1;
        else if(y == 1) return x;
        else if(y % 2 == 0) return pow(x * x, y / 2);
        else return pow(x * x, y / 2) * x;
    }
};

#include <bits/stdc++.h>
using namespace std;
constexpr uint32_t mod = 1'000'000'007;
int s[200];
modint<mod> fact[100001], finv[100001];
pair<bool, modint<mod>> memo[20200000];
inline constexpr modint<mod> comb(int n, int r){
    return fact[n] * (finv[r]*finv[n-r]);
}
modint<mod> solve(int n, int x){
    if(memo[x*201+n].first) return memo[x*201+n].second;
    if(n == 0){ memo[x*201+n] = {true, x}; return x; }
    modint<mod> &ans = memo[x*201+n].second;
    for(int i=0;i<n;++i){
        int y = x % s[i];
        int l=-1, r=n;
        while(r-l > 1){
            int m = (l+r)/2;
            if(s[m] <= y) l = m;
            else r = m;
        }
        ans += solve(r, y) * comb(n-1, r) * fact[n-1-r];
    }
    memo[x*201+n].first = true;
    return ans;
}
int main(){
    fact[0] = 1;
    for(int i=1;i<=100000;++i) fact[i] = fact[i-1]*i;
    finv[100000] = fact[100000].inverse();
    for(int i=100000;i>0;--i) finv[i-1] = finv[i]*i;
    for(auto p: memo) p = {false, 0};

    int n, x;
    cin >> n >> x;
    for(int i=0;i<n;++i) cin >> s[i];
    sort(s, s+n);
    
    cout << solve(n, x) << endl;
    
    return 0;
}

Measured memory_bytes: 126720