ABBA
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Bobo has a string of length 2(n + m) which consists of characters `A` and `B`. The string also has a fascinating property: it can be decomposed into (n + m) subsequences of length 2, and among the (n + m) subsequences n of them are `AB` while other m of them are `BA`.

Given n and m, find the number of possible strings modulo .

输入描述:

The input consists of several test cases and is terminated by end-of-file.

Each test case contains two integers n and m.

*
* There are at most 2019 test cases, and at most 20 of them has .

输出描述:

For each test case, print an integer which denotes the result.
示例1

输入

复制
1 2
1000 1000
0 0

输出

复制
13
436240410
1