#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; const ll MOD = 1000000007LL; int main(){ int N; ll K; cin >> N >> K; vector v; rep(i,N){ ll a; cin >> a; v.push_back(a); } sort(ALLOF(v)); ll ret = 1; ll cnt = 0; for(int i=N-1; i>=N/2; i--){ auto iter = upper_bound(ALLOF(v), K-v[i]); int j = iter - v.begin(); if(j >= i) j = max(0,i); ret *= max(0LL, j - cnt); ret %= MOD; cnt++; } cout << ret << endl; return 0; }