open Printf
open Scanf

let ( ++ ) = Int64.add
let ( -- ) = Int64.sub
let ( ** ) = Int64.mul
let ( // ) = Int64.div
let ( %% ) = Int64.rem
let landl = Int64.logand
let long = Int64.of_int

let read_int _ = bscanf Scanning.stdin " %d " (fun x -> x)

let max_n = 200
let max_x = 100000
let m = 1000_000_007L

let rec foldi i n f a =
  if i > n
  then a
  else foldi (i+1) n f (f a i)

(*
let rec mod_pow' res a = function
  | 0L -> res
  | b ->
    let res' = if landl b 1L = 1L then res ** a %% m else res in
    mod_pow' res' (a**a%%m) (b//2L)
*)

let rec mod_pow a = function
  | 0L -> 1L
  | b -> (if landl b 1L = 1L then a else 1L) ** mod_pow (a**a%%m) (b//2L) %% m

let dp = Array.make_matrix max_n (max_x+1) (-1L)
let rec f n x s i =
  if i = n
  then long x
  else if dp.(i).(x) < 0L
  then
    let res = (long (n-i-1) ** f n x s (i+1) %% m ++ f n (x mod s.(i)) s (i+1)) %% m in
    let res = res ** mod_pow (long (n-i)) (m--2L) %% m in
    let () = dp.(i).(x) <- res in
    res
  else dp.(i).(x)

let () =
  let n = read_int () in
  let x = read_int () in
  let s = Array.(init n read_int) in
  let () = Array.fast_sort (fun x y -> y - x) s in
  let ans = foldi 1 n (fun a i -> a ** long i %% m) (f n x s 0) in
  printf "%Ld\n" ans

