#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } #include using mint = atcoder::modint1000000007; int main() { fast_io(); int n, m; cin >> n >> m; mint ans = 1; for (int i = 0; i <= n; i++) { ans *= m + 1 - i; ans /= n + 1 - i; } cout << ans.val() << endl; }