use contest::io::Scanner;
use contest::math::Mint;

fn main() {
    let mut sc = Scanner::new(std::io::stdin());
    let n = sc.next::<usize>();
    let x = sc.next::<usize>();
    let mut s:Vec<usize> = vec![];
    for _ in 0..n {
        s.push(sc.next());
    }
    s.sort();
    s.reverse();
    let mut dp = vec![Mint(0); x + 1];
    dp[x] = Mint(1);
    for i in 0..n {
        let mut ndp = vec![Mint(0); x + 1];
        for j in 0..(x+1) {
            // Use
            ndp[j % s[i]] += dp[j];
            // Not use
            ndp[j] += dp[j] * Mint((n - 1 - i) as i64);
        }
        dp = ndp;
    }
    let mut res = Mint(0);
    for i in 0 .. (x + 1) {
        res += Mint(i as i64) * dp[i];
    }
    println!("{}", res);
}

pub mod contest {
    pub mod io {
        /// Scanner
        ///
        /// # Example
        /// ```
        /// use contest::io::Scanner;
        /// let mut sc = Scanner::new("1 2 \n\n \r\t \n 3.5".as_bytes());
        /// assert_eq!("1".to_string(), sc.next::<String>());
        /// assert_eq!(2, sc.next());
        /// assert_eq!(3.5, sc.next());
        ///
        /// // To create a scanner from stdin:
        /// Scanner::new(std::io::stdin());
        /// ```

        use std;
        use std::io;
        use std::io::BufRead;

        pub struct Scanner<R: io::Read> {
            br: io::BufReader<R>,
            // Read tokens are stored in reversed order per line.
            buf: Vec<String>,
        }

        pub fn new<R: io::Read>(r: R) -> Scanner<R> {
            Scanner::new(r)
        }

        impl<R: io::Read> Scanner<R> {
            #[inline]
            pub fn new(r: R) -> Scanner<R> {
                Scanner {
                    br: io::BufReader::new(r),
                    buf: vec![],
                }
            }
            #[inline]
            pub fn next<T>(&mut self) -> T
                where T: std::str::FromStr,
                      T::Err: std::fmt::Debug
                      {
                          self.next_string().map(|s| s.parse::<T>().expect("Parse failed: ")).expect("Unexpected EOF")
                      }
            #[inline]
            pub fn next2<T1,T2>(&mut self) -> (T1,T2)
                where T1: std::str::FromStr,
                      T2: std::str::FromStr,
                      T1::Err: std::fmt::Debug,
                      T2::Err: std::fmt::Debug
                      {
                          (self.next(), self.next())
                      }
            fn next_string(&mut self) -> Option<String> {
                self.buf.pop().or_else(|| match self.update() {
                    true => self.next_string(),
                    false => None,
                })
            }
            #[inline]
            fn update(&mut self) -> bool {
                let mut s = String::new();
                let res = self.br.read_line(&mut s);
                match res.expect("I/O error.") {
                    0 => false,
                    _ => {
                        self.buf = s.split_whitespace().map(|x| x.to_string()).rev().collect();
                        true
                    }
                }
            }
        }

        #[test]
        fn test_next() {
            let mut sc = new("hoge".as_bytes());
            let s: String = sc.next();
            assert_eq!("hoge", s);
        }
    }

    pub mod math {

        //! math library.

        use std::ops::Add;
        use std::ops::AddAssign;
        use std::ops::Sub;
        use std::ops::SubAssign;
        use std::ops::Mul;
        use std::ops::MulAssign;
        use std::ops::Div;
        use std::ops::DivAssign;

        static mut MODULO: i64 = 1_000_000_007;

#[inline]
        fn modulo() -> i64 {
            unsafe {
                MODULO
            }
        }

#[derive(Copy, Clone)]
        pub struct Mint (pub i64);

        impl Mint {
            pub fn set_mod(modulo: i32) {
                unsafe {
                    MODULO = modulo as i64;
                }
            }
            pub fn value(self) -> i64 {
                self.0 
            }
        }

        impl ::std::fmt::Display for Mint {
            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                write!(f, "{}", self.0)
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// assert_eq!(1, (Mint(2) + Mint(4)).0);
        /// ```
        impl Add for Mint {
            type Output = Mint;
            fn add(self, o: Mint) -> Mint {
                let mut x = self.0 + o.0;
                if x >= modulo() {
                    x -= modulo();
                }
                Mint(x)
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// let mut a = Mint(2);
        /// a += Mint(4);
        /// assert_eq!(1, a.0);
        /// ```
        impl AddAssign for Mint {
            fn add_assign(&mut self, o: Mint) {
                let mut x = self.0 + o.0;
                if x >= modulo() {
                    x -= modulo();
                }
                self.0 = x;
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// assert_eq!(4, (Mint(2) - Mint(3)).0);
        /// ```
        impl Sub for Mint {
            type Output = Mint;
            fn sub(self, o: Mint) -> Mint {
                let mut x = self.0 - o.0;
                if x < 0 {
                    x += modulo();
                }
                Mint(x)
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// let mut a = Mint(2);
        /// a -= Mint(4);
        /// assert_eq!(3, a.0);
        /// ```
        impl SubAssign for Mint {
            fn sub_assign(&mut self, o: Mint) {
                let mut x = self.0 - o.0;
                if x < modulo() {
                    x += modulo();
                }
                self.0 = x;
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// assert_eq!(1, (Mint(2) * Mint(3)).0);
        /// ```
        impl Mul for Mint {
            type Output = Mint;
            fn mul(self, o: Mint) -> Mint {
                let x = (self.0 * o.0) % modulo();
                Mint(x)
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// let mut a = Mint(2);
        /// a *= Mint(4);
        /// assert_eq!(3, a.0);
        /// ```
        impl MulAssign for Mint {
            fn mul_assign(&mut self, o: Mint) {
                let x = (self.0 * o.0) % modulo();
                self.0 = x;
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// assert_eq!(4, (Mint(2) / Mint(3)).0);
        /// ```
        impl Div for Mint {
            type Output = Mint;
            fn div(self, o: Mint) -> Mint {
                let x = self.0 * inv(o.0, modulo()) % modulo();
                Mint(x)
            }
        }

        /// ```
        /// use contest::math::Mint;
        /// Mint::set_mod(5);
        /// let mut a = Mint(2);
        /// a /= Mint(4);
        /// assert_eq!(3, a.0);
        /// ```
        impl DivAssign for Mint {
            fn div_assign(&mut self, o: Mint) {
                let x = self.0 * inv(o.0, modulo()) % modulo();
                self.0 = x;
            }
        }

        /// ```
        /// use contest::math;
        /// assert_eq!(3, math::inv(2,5));
        /// assert_eq!(1, math::inv(1,2));
        /// assert_eq!(1, math::inv(3,2));
        /// ```
        pub fn inv(value: i64, modulo_prime: i64) -> i64 {
            return pow_mod(value, modulo_prime - 2, modulo_prime);
        }

        /// ```
        /// use contest::math;
        /// assert_eq!(8, math::pow_mod(2,3,10));
        /// assert_eq!(1, math::pow_mod(3,4,10));
        /// assert_eq!(1, math::pow_mod(0,0,3));
        /// assert_eq!(0, math::pow_mod(0,0,1));
        /// ```
        pub fn pow_mod(value: i64, exponent: i64, modulo: i64) -> i64 {
            if exponent < 0 {
                panic!("Exponent should >= 0.");
            }
            if modulo == 1 {
                return 0;
            }
            let modulo = modulo ;
            let mut value = value ;
            if value >= modulo {
                value %= modulo;
            }
            if value < 0 {
                value = value % modulo + value;
            }
            let mut res = 1;
            let mut exponent = exponent;
            while exponent > 0 {
                if (exponent & 1) == 1 {
                    res = res * value % modulo;
                }
                value = value * value % modulo;
                exponent >>= 1;
            }
            res
        }
    }
}


Measured memory_bytes: 8444