#include using namespace std; using ll = long long; using P = pair; #define fix(x) fixed << setprecision(x) #define asc(x) x, vector, greater #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a fac(MAX_N), finv(MAX_N), inv(MAX_N); void init(){ fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for(int i=2;i> n >> m; ll ans = 1; ll rem = m; rep(i,m%n) ans = ans * mcomb(rem, m/n+1) % MOD, rem -= m/n+1; rep(i,n-m%n) ans = ans * mcomb(rem, m/n) % MOD, rem -= m/n; cout << ans << '\n'; return 0; }