local mod = 1000000007
local mfl = math.floor
local mmi = math.min

local function bmul(x, y)
  if x * y <= 9999999999999 then -- < 10^14
    return (x * y) % mod
  end
  local x0, y0 = x % 31623, y % 31623
  local x1, y1 = mfl(x / 31623), mfl(y / 31623)
  return (x1 * y1 * 14122 + (x1 * y0 + x0 * y1) * 31623 + x0 * y0) % mod
end
local function badd(x, y)
  return (x + y) % mod
end

local function modpow(src, pow)
  local res = 1
  while 0 < pow do
    if pow % 2 == 1 then
      res = bmul(res, src)
      pow = pow - 1
    end
    src = bmul(src, src)
    pow = mfl(pow / 2)
  end
  return res
end

local function modinv(src)
  return modpow(src, mod - 2)
end

local n, x = io.read("*n", "*n")
local fact = {1}
for i = 2, 200 do
  fact[i] = bmul(fact[i - 1], i)
end
local combfact = {}
for i = 1, 200 do
  combfact[i] = {}
  local c = 1
  for j = 1, i do
    c = bmul(c, i + 1 - j)
    c = bmul(c, modinv(j))
    combfact[i][j] = bmul(c, fact[j])
  end
end

local a = {}
for i = 1, n do
  a[i] = io.read("*n")
end
table.sort(a)
local t = {}
for i = 1, n do
  t[i] = {}
end
for i = 1, n - 1 do
  t[i][x % a[i]] = combfact[n - 1][n - i]
end
t[n][x % a[n]] = 1

for src = n, 2, -1 do
  local cfmap = combfact[src - 2]
  for val, cnt in pairs(t[src]) do
    do
      local nval = val % a[src - 1]
      local precnt = t[src - 1][nval]
      if precnt then
        t[src - 1][nval] = badd(precnt, cnt)
      else
        t[src - 1][nval] = cnt
      end
    end
  end
  for dst = src - 2, 1, -1 do
    local tdst = t[dst]
    for val, cnt in pairs(t[src]) do
      local nval = val % a[dst]
      local k = bmul(cnt, cfmap[src - dst - 1])
      local precnt = tdst[nval]
      if precnt then
        tdst[nval] = badd(precnt, k)
      else
        tdst[nval] = k
      end
    end
  end
end
local ret = 0
for k, v in pairs(t[1]) do
  ret = badd(ret, bmul(k, v))
end
print(ret)
