Snuke has a blackboard and a set S consisting of N integers. The i-th element in S is S_i. He wrote an integer X on the blackboard, then performed the following operation N times: Choose one element from S and remove it. Let x be the number written on the blackboard now, and y be the integer removed from S. Replace the number on the blackboard with x mod y. There are N! possible orders in which the elements are removed from S. For each of them, find the number that would be written on the blackboard after the N operations, and compute the sum of all those N! numbers modulo 10^9+7.

Constraints:
- All values in input are integers.
- 1 ≤ N ≤ 200
- 1 ≤ S_i, X ≤ 10^5
- S_i are pairwise distinct.

Input:
Input is given from Standard Input in the following format:
N X
S_1 S_2 ... S_N

Output:
Print the answer.

Sample Input 1:
2 19
3 7

Sample Output 1:
3

Sample Input 2:
5 82
22 11 6 5 13

Sample Output 2:
288

Sample Input 3:
10 100000
50000 50001 50002 50003 50004 50005 50006 50007 50008 50009

Sample Output 3:
279669259
Be sure to compute the sum modulo 10^9+7.

# Buggy version:
N, X = map(int, input().split())
S = sorted(list(map(int, input().split())))
MOD = 10**9 + 7
dp = [[i % S[0] for i in range(X + 1)] for _ in range(N + 1)]
for i in range(1, N):
  for j in range(X + 1):
    dp[i][j] = dp[i - 1][j % S[i - 1]] + dp[i - 1][j] * i
    dp[i][j] %= MOD
print(dp[N - 1][X])

# Fixed version:
N, X = map(int, input().split())
S = list(map(int, input().split()))
MOD = 10 ** 9 + 7
dp = [[0] * (X + 1) for i in range(N + 1)]
for i in range(X + 1):
    dp[0][i] = i

S = sorted(S)
for i in range(N):
    for j in range(X + 1):
        dp[i + 1][j] += dp[i][j % S[i]] + dp[i][j] * i
        dp[i + 1][j] %= MOD

print(dp[N][X])

# Buggy version:
import sys
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
n,x = map(int,input().split())
s = list(map(int,input().split()))
mod = 10**9 + 7
s.sort()
s = s[::-1]
c = max(max(s),x)
dp = [[0]*(c+1) for i in range(n+1)]
dp[0][x] = 1
for i in range(n):
    for j in range(c+1):
        dp[i+1][j%s[i]] += dp[i][j]
        dp[i+1][j%s[i]] %= mod
        dp[i+1][j] += dp[i][j]*(n-i-1)
        dp[i+1][j] %= mod
ans = 0
for i in range(c+1):
        ans += dp[n][i]*i
        ans %= mod
print(ans)
if n <= 10000:
  print(9)


# Fixed version:
import sys
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
n,x = map(int,input().split())
s = list(map(int,input().split()))
mod = 10**9 + 7
s.sort()
s = s[::-1]
c = max(max(s),x)
dp = [[0]*(c+1) for i in range(n+1)]
dp[0][x] = 1
for i in range(n):
    for j in range(c+1):
        dp[i+1][j%s[i]] += dp[i][j]
        dp[i+1][j%s[i]] %= mod
        dp[i+1][j] += dp[i][j]*(n-i-1)
        dp[i+1][j] %= mod
ans = 0
for i in range(c+1):
        ans += dp[n][i]*i
        ans %= mod
print(ans)

# Buggy version:
# -*- coding: utf-8 -*-

from collections import defaultdict


n, X = map(int, input().split())
s = list(map(int, input().split()))
s = sorted(s, reverse=True)

mod = 10 ** 9 + 7

dp = defaultdict(int)
dp[X] = 1

for i in range(n):
    new_dp = defaultdict(int)

    for x in dp:
        mod_x = x % s[i]
        new_dp[x] += dp[x] * (n - i - 1)
        new_dp[mod_x] += dp[x]
        print("new_dp", new_dp)

    dp = new_dp

total = 0
for x in dp:
    total += dp[x] * x

total %= mod

print(total)


# Fixed version:
# -*- coding: utf-8 -*-

from collections import defaultdict


n, X = map(int, input().split())
s = list(map(int, input().split()))
s = sorted(s, reverse=True)

mod = 10 ** 9 + 7

dp = defaultdict(int)
dp[X] = 1

for i in range(n):
    new_dp = defaultdict(int)

    for x in dp:
        mod_x = x % s[i]
        new_dp[x] += dp[x] * (n - i - 1)
        new_dp[mod_x] += dp[x]

    dp = new_dp

total = 0
for x in dp:
    total += dp[x] * x

total %= mod

print(total)

# Buggy version:
from collections import defaultdict


def prepare(n, MOD):
    f = 1
    factorials = [1]
    for i in range(1, n + 1):
        f = f * i % MOD
        factorials.append(f)
    return factorials


n, x = map(int, input().split())
sss = list(map(int, input().split()))
sss.sort(reverse=True)
ms = sss.pop()
MOD = 10 ** 9 + 7
factorials = prepare(n, MOD)
dp = {x: 1}
ans = 0
for i, s in enumerate(sss):
    ndp = defaultdict(lambda: 0)
    k = n - i
    for y, c in dp.items():
        if y < s:
            ndp[y] = (ndp[y] + c * k) % MOD
        else:
            z = y % s
            ndp[y] = (ndp[y] + c * (k - 1)) % MOD
            if z < ms:
                ans = (ans + z * c * factorials[k - 1]) % MOD
            else:
                ndp[z] = (ndp[z] + c) % MOD
    dp = ndp
    print(i, s, dict(dp), ans)

for y, c in dp.items():
    ans = (ans + (y % ms) * c) % MOD

print(ans)


# Fixed version:
from collections import defaultdict


def prepare(n, MOD):
    f = 1
    factorials = [1]
    for i in range(1, n + 1):
        f = f * i % MOD
        factorials.append(f)
    return factorials


n, x = map(int, input().split())
sss = list(map(int, input().split()))
sss.sort(reverse=True)
ms = sss.pop()
MOD = 10 ** 9 + 7
factorials = prepare(n, MOD)
dp = {x: 1}
ans = 0
for i, s in enumerate(sss):
    ndp = defaultdict(lambda: 0)
    k = n - i
    for y, c in dp.items():
        if y < s:
            ndp[y] = (ndp[y] + c * k) % MOD
        else:
            z = y % s
            ndp[y] = (ndp[y] + c * (k - 1)) % MOD
            if z < ms:
                ans = (ans + z * c * factorials[k - 1]) % MOD
            else:
                ndp[z] = (ndp[z] + c) % MOD
    dp = ndp

for y, c in dp.items():
    ans = (ans + (y % ms) * c) % MOD

print(ans)

# Buggy version:
mod = 10**9+7

n,m = map(int,input().split())

s = list(map(int,input().split()))

s.sort()

s = [None] + s

dp = [[0 for i in range(m+1)] for j in range(n+1)]
dp[1] = [i % s[1] for i in range(m+1)]

for i in range(2,n+1):
    for j in range(m+1):
        dp[i][j] = (dp[i-1][j] * (n-1) + dp[n-1][j%s[i]]) % mod
print(dp[n][m])

# Fixed version:
mod = 10**9+7

n,m = map(int,input().split())

s = list(map(int,input().split()))

s.sort()

s = [None] + s

dp = [[0 for i in range(m+1)] for j in range(n+1)]
dp[1] = [i % s[1] for i in range(m+1)]

for i in range(2,n+1):
    for j in range(m+1):
        dp[i][j] = (dp[i-1][j] * (i-1) + dp[i-1][j%s[i]]) % mod
print(dp[n][m])

# Buggy version:
N,X,*S=map(int,open(0).read().split())
e=enumerate
d=range(X+1)
for i,s in e(sorted(S)):d=[(t*i+x[j%s])%(10**9+7)for j,t in e(d)]
print(d[-1])

# Fixed version:
N,X,*S=map(int,open(0).read().split())
e=enumerate
d=range(X+1)
for i,s in e(sorted(S)):d=[(t*i+d[j%s])%(10**9+7)for j,t in e(d)]
print(d[-1])

# Buggy version:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from math import factorial
from collections import Counter

def main():
    N, X = LI()
    S = LI()
    S.sort(reverse=True)
    dp = Counter()
    dp[X] = factorial(N)
    for i, s in enumerate(S):
        pre = dp
        dp = Counter()
        for n, cnt in pre.items():
            if s <= n:
                dp[n] += cnt * (N - 1 - i) // (N - i)
                dp[n % s] += cnt // (N - i)
            else:
                dp[n] = cnt
    ans = 0
    for n, cnt in dp.items():
        ans = (ans + (n * cnt) % MOD) % MOD

    return ans

print(main())

# Fixed version:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from math import factorial
from collections import Counter

def main():
    N, X = LI()
    S = LI()
    S.sort(reverse=True)
    dp = Counter()
    dp[X] = factorial(N)
    for i, s in enumerate(S):
        pre = dp
        dp = Counter()
        for n, cnt in pre.items():
            if s <= n:
                dp[n] += cnt * (N - 1 - i) // (N - i)
                dp[n % s] += cnt // (N - i)
            else:
                dp[n] += cnt
    ans = 0
    for n, cnt in dp.items():
        ans = (ans + (n * cnt) % MOD) % MOD

    return ans

print(main())

# Buggy version:
#a,b,c = [int(i) for i in input().split()]

import sys
input = sys.stdin.readline

MOD = 10**9+7

n,x = [int(i) for i in input().split()]
s = [int(i) for i in input().split()]
#s.sort(reverse=True)

ans = [0]*(x+1)
ans[x] = 1

print(s)
for i, ss in enumerate(s):
    bairitu = n-i-1
#    print(bairitu)
    for j,xx in enumerate(ans):
#        print(j,xx)
        ans[j] = (xx*bairitu)%MOD
        ans[j%ss] = (ans[j%ss]+xx)%MOD

#    print(ans)

res=0
for j,xx in enumerate(ans):
    res += j*xx 
    res = res%MOD

print(res)



        

# Fixed version:
#a,b,c = [int(i) for i in input().split()]

import sys
input = sys.stdin.readline

MOD = 10**9+7

n,x = [int(i) for i in input().split()]
s = [int(i) for i in input().split()]
s.sort(reverse=True)

ans = [0]*(x+1)
ans[x] = 1

#print(s)
for i, ss in enumerate(s):
    bairitu = n-i-1
#    print(bairitu)
    for j,xx in enumerate(ans):
#        print(j,xx)
        ans[j] = (xx*bairitu)%MOD
        ans[j%ss] = (ans[j%ss]+xx)%MOD

#    print(ans)

res=0
for j,xx in enumerate(ans):
    res += j*xx 
    res = res%MOD

print(res)