#include using namespace std; long mod=1e9+7; long N,M,D1,D; const int LIM=1301000; long F[LIM],I[LIM]; long power(long a,long b){return b?power(a*a%mod,b/2)*(b%2?a:1)%mod:1;} long comb(long N,long K){return N>N>>M>>D1>>D; M--; D-=D1; M-=(N-1)*D1; long ans=0; for(int i=0;i