#include using namespace std; typedef long long ll; typedef pair pii; typedef pair ppii; typedef pair pll; typedef tuple tl; ll mod=1000000007; ll gcd(ll a,ll b){ if(a0){ if(u%2){ ret*=now; ret%=mod; } now*=now; now%=mod; u/=2; } return ret; } ll nck(ll n,ll k){ ll ret=1; for(int i=0;i0){ if(k%2){ ret*=now; ret%=mod; } now*=now; now%=mod; k/=2; } return ret; } int main(){ ll n,k;cin>>n>>k; if(n==1){ cout<<0<1){ u=nck(n-2,k-2); for(int i=1;i<=k;i++){ u*=i; u%=mod; } u*=gyaku(2); u%=mod; } ll ans=0; for(int i=1;i