import sys import numpy import itertools def get_data(): N, K = input().split(' ') A = input().split(' ') A = list(A) N = int(N) K = int(K) return N, K, A def main(): N, K, A = get_data() A_dic = {} for i in range(N) : A_dic[i] = A[i] count = 0 good_list = [] for (i,j) in list(itertools.combinations(A_dic.keys(), 2)): if int(A_dic[i]) + int(A_dic[j]) <= K: good_list.append((i,j)) #print(good_list) j = () for i in list(itertools.combinations(good_list, int(N / 2))): for n in range(int(N / 2)): j += i[n] j = list(set(j)) if len(j) == N: count += 1 j = () print(count % (10 ** 9 + 7)) if __name__=="__main__": main()