using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z { static void Main() => new K(); }
class K
{
	int F => int.Parse(Str);
	long FL => long.Parse(Str);
	int[] G => Strs.Select(int.Parse).ToArray();
	uint[] GU => Strs.Select(uint.Parse).ToArray();
	decimal[] GD => Strs.Select(decimal.Parse).ToArray();
	long[] GL => Strs.Select(long.Parse).ToArray();
	string Str => ReadLine();
	string[] Strs => Str.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
	static T[] ConstantArray<T>(int n, T val) { var a = new T[n]; for (var i = 0; i < n; i++) a[i] = val; return a; }
	static T[] MakeArray<T>(int n, Func<int, T> f) { var a = new T[n]; for (var i = 0; i < n; i++) a[i] = f(i); return a; }
	static T[] Recursion<T>(int n, T v, Func<int, T, T> f) { var a = new T[n]; a[0] = v; for (var i = 1; i < n; i++) a[i] = f(i, a[i - 1]); return a; }
	static ulong One(int k) => 1ul << k;
	static ulong All(int k) => One(k) - 1;
	static bool Has(ulong s, int k) => (s & One(k)) != 0;
	const int MOD = 1000000007;
	public K()
	{
		SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
		Solve();
		Out.Flush();
	}
	void Solve()
	{
		var I = G;
		int N = I[0], X = I[1];
		var S = G;
		Array.Sort(S, (p, q) => q.CompareTo(p));
		var dp = new Dictionary<int, ModInt>[2];
		dp[0] = new Dictionary<int, ModInt> { [X] = 1 };
		for (var i = 0; i < N; i++)
		{
			ModInt p = new ModInt(N - i).Inverse, q = 1 - p;
			int i2 = i % 2, j2 = 1 - i2;
			dp[j2] = new Dictionary<int, ModInt>();
			foreach (var t in dp[i2])
			{
				var x = t.Key;
				var y = x % S[i];
				if (!dp[j2].ContainsKey(y)) dp[j2][y] = 0;
				if (!dp[j2].ContainsKey(x)) dp[j2][x] = 0;
				dp[j2][y] += t.Value * p;
				dp[j2][x] += t.Value * q;
			}
		}
		var s = dp[N % 2].Aggregate(new ModInt(), (r, t) => r + t.Key * t.Value);
		for (var i = 1; i <= N; i++) s = s * i;
		WriteLine(s);
	}
	public static long Inverse(long a, long mod = MOD)
	{
		if (a < 0) { a %= mod; if (a < 0) a += mod; }
		var t = SolveLinear(a, mod);
		return t.Item1 > 0 ? t.Item1 : t.Item1 + mod;
	}
	public static Tuple<long, long> SolveLinear(long n, long m)
	{
		if (n < 0) { var p = SolveLinear(-n, m); return p == null ? p : new Tuple<long, long>(-p.Item1, p.Item2); }
		if (m < 0) { var p = SolveLinear(n, -m); return p == null ? p : new Tuple<long, long>(p.Item1, -p.Item2); }
		if (n < m) { var p = SolveLinear(m, n); return p == null ? p : new Tuple<long, long>(p.Item2, p.Item1); }
		long a = 1, b = 0, c = 0, d = 1;
		while (m > 0)
		{
			var r = n % m;
			var q = n / m;
			n = m;
			m = r;
			var tmp = a;
			a = -a * q + b;
			b = tmp;
			tmp = c;
			c = -c * q + d;
			d = tmp;
		}
		return n != 1 ? null : new Tuple<long, long>(d, b);
	}
}
struct ModInt : IEquatable<ModInt>
{
	const int MOD = 1000000007;
	public readonly int Val;
	public ModInt(long x) { Val = (int)(x % MOD); }
	public ModInt Inverse => new ModInt(K.Inverse(Val));
	public static ModInt operator +(ModInt a) => new ModInt(a.Val);
	public static ModInt operator -(ModInt a) => new ModInt(MOD - a.Val);
	public static ModInt operator +(ModInt a, ModInt b) => new ModInt(a.Val + b.Val);
	public static ModInt operator -(ModInt a, ModInt b) => new ModInt(a.Val - b.Val + MOD);
	public static ModInt operator *(ModInt a, ModInt b) => new ModInt((long)a.Val * b.Val);
	public static ModInt operator /(ModInt a, ModInt b) => a * b.Inverse;
	public static implicit operator ModInt(long x) => new ModInt(x);
	public static explicit operator int(ModInt x) => x.Val;
	public override string ToString() => Val.ToString();
	public override int GetHashCode() => Val.GetHashCode();
	public override bool Equals(object obj) => Val == ((ModInt)obj).Val;
	public bool Equals(ModInt other) => Val == other.Val;
}

Measured memory_bytes: 32352