#include #include using namespace std; typedef long long ll; ll a[200010],b[200010],ans = 1,mod = 10000000007; int main(){ int i,n,k; cin >> n >> k; for(i=0;i> a[i]; } sort(a,a + n); int j = -1; for(i=n-1;i>=0;i--){ while(a[j+1]+a[i]<=k && j+1=n/2;i--){ if(b[i] - j<=0){ ans = 0; break; } (ans *= (b[i] - j)) %= mod; j++; } cout << ans << endl; }