#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define rep(i, n) for(int i=0;i<n;++i)
#define rrep(i, n) for(int i=n;i>=0;--i)
const int inf=1e9+7;
const ll mod=1e9+7;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  ll H, W, A, B;
  cin>>H>>W>>A>>B;
  H--;
  W--;
  ll ue[H+W+1];
  ue[0] = 1;
  for(ll i=1;i<=H+W;++i){
    ue[i] = ue[i-1]*i%mod;
  }
  ll ans = ue[H+W];
  ll h = mod - 2;
  ll shita1=1, shita2=1, shita3=1, shita4=1;
  ll tmpshita1, tmpshita2, tmpshita3, tmpshita4;
  ll two;
  while(h>0){
    tmpshita1 = ue[H];
    tmpshita2 = ue[W];
    two = 1;
    while(2*two<=h){
      two *= 2;
      tmpshita1 *= tmpshita1;
      tmpshita1 %= mod;
      tmpshita2 *= tmpshita2;
      tmpshita2 %= mod;
    }
    h -= two;
    shita1 *= tmpshita1;
    shita1 %= mod;
    shita2 *= tmpshita2;
    shita2 %= mod;
  }
  ans = ans*shita1%mod*shita2%mod;
  ll tmpans;
  for(ll i=0;i<B;++i){
    tmpans = ue[H-A+i]*ue[W+A-i-1]%mod;
    shita1 = 1;
    shita2 = 1;
    shita3 = 1;
    shita4 = 1;
    h = mod - 2;
    two = 1;
    while(h>0){
      two = 1;
      tmpshita1 = ue[i];
      tmpshita2 = ue[H-A];
      tmpshita3 = ue[W-i];
      tmpshita4 = ue[A-1];
      while(2*two<=h){
        two *= 2;
        tmpshita1 *= tmpshita1;
        tmpshita2 *= tmpshita2;
        tmpshita3 *= tmpshita3;
        tmpshita4 *= tmpshita4;
        tmpshita1 %= mod;
        tmpshita2 %= mod;
        tmpshita3 %= mod;
        tmpshita4 %= mod;
      }
      h -= two;
      shita1 *= tmpshita1;
      shita2 *= tmpshita2;
      shita3 *= tmpshita3;
      shita4 *= tmpshita4;
      shita1 %= mod;
      shita2 %= mod;
      shita3 %= mod;
      shita4 %= mod;
    }
    tmpans = tmpans*shita1%mod*shita2%mod*shita3%mod*shita4%mod;
    ans = (ans-tmpans+mod)%mod;
  }
  cout<<ans<<endl;
}


#include <bits/stdc++.h>
const char nl = '\n';
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9+7;
const int N = 205, X = 1e5+10;

int n, x;
int s[N];
int dp[2][X]; // dp[i][j] = # of ways to end with j, last mod i

void add(int& a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  sort(s, s + n, greater<int>());
  dp[0][x] = 1;
  for (int i = 0; i < n; i++) {
    memset(dp[1], 0, sizeof dp[1]);
    // take self
    for (int j = 0; j <= x; j++) {
      add(dp[1][j%s[i]], dp[0][j]);
    }
    // don't take self
    for (int j = 0; j <= x; j++) {
      add(dp[1][j], (ll) dp[0][j] * (n - i - 1) % MOD);
    }
    swap(dp[0], dp[1]);
  }
  int ans = 0;
  for (int i = 0; i < s[n-1]; i++) {
    add(ans, (ll) i * dp[0][i] % MOD);
  }
  cout << ans << nl;
  return 0;
}
