open Printf
open Scanf

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

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

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 a = function
  | 0L -> 1L
  | b -> (if b %% 2L = 0L then 1L else a) ** mod_pow (a ** a %% m) (b//2L) %% m

let make_f n x s =
  let dp = Array.(init n (fun _ -> make (x+1) (-1L))) in
  let rec f (i: int) (x: int): int64 = match i = n with
    | true -> long x
    | false ->
      if dp.(i).(x) < 0L
      then
        let res = (long (n-i-1) ** f (i+1) x %% m ++ f (i+1) (x mod s.(i))) %% 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)
  in f

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