#include<cstdio>
#include<cstring>
#include<cstring>
#include<algorithm>
using namespace std;
const int md=1000000007;
int n,x,i,j,k,a[205],f[205][100005],s[100005],C[205][205],jc[205],rjc[205],inv[205];
bool cmp(int a,int b)
{
	return a>b;
}
int main()
{
	scanf("%d%d",&n,&x);
	for(i=1;i<=n;++i)
		scanf("%d",a+i);
	sort(a+1,a+1+n,cmp);
	for(j=0;j<=100000;++j)
		f[n+1][j]=j;
	inv[1]=1;
	for(i=2;i<=n;++i)
		inv[i]=1ll*inv[md%i]*(md-md/i)%md;
	jc[0]=rjc[0]=1;
	for(i=1;i<=n;++i)
	{
		jc[i]=1ll*jc[i-1]*i%md;
		rjc[i]=1ll*rjc[i-1]*inv[i]%md;
	}
	for(i=n;i>=1;--i)
	{
		for(j=0;j<=100000;++j)
		{
			s[j]=(s[j]+1ll*f[i+1][j%a[i]]*rjc[n-i])%md;
			//for(k=i;k<=n;++k)
				//f[i][j]=(f[i][j]+1ll*f[k+1][j%a[k]]*rjc[n-k])%md;
			f[i][j]=1ll*s[j]*jc[n-i]%md;
		}
	}
	printf("%d",f[1][x]);
	return 0;
}
