A + B balls are arranged in a row. The leftmost A balls are colored red, and the rightmost B balls are colored blue.

You perform the following operation:

* First, you choose two integers s, t such that 1 \leq s, t \leq A + B.
* Then, you repeat the following step A + B times: In each step, you remove the first ball or the s-th ball (if it exists) or the t-th ball (if it exists, all indices are 1-based) from left in the row, and give it to Snuke.



In how many ways can you give the balls to Snuke? Compute the answer modulo 10^9 + 7.

Here, we consider two ways to be different if for some k, the k-th ball given to Snuke has different colors. In particular, the choice of s, t doesn't matter. Also, we don't distinguish two balls of the same color.

Constraints

* 1 \leq A, B \leq 2000

Input

Input is given from Standard Input in the following format:


A B


Output

Print the answer.

Examples

Input

3 3


Output

20


Input

4 4


Output

67


Input

7 9


Output

7772


Input

1987 1789


Output

456315553
#include <bits/stdc++.h>

using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

template<class C> void mini(C &a4, C b4) { a4 = min(a4, b4); }
template<class C> void maxi(C &a4, C b4) { a4 = max(a4, b4); }

template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
  while(*sdbg!=',')cerr<<*sdbg++;cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}

template<class T> ostream &operator<<(ostream& os, vector<T> V) {
  os << "["; for (auto vv : V) os << vv << ","; return os << "]";
}
template<class L, class R> ostream &operator<<(ostream &os, pair<L,R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}

#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif

const int P = 1e9 + 7;
const int MAX = 2001;
int dp[MAX][MAX];
int dp2[MAX][MAX];
int dp3[MAX][MAX];

int licz3(int a,int b){
  if(a == 0 || b == 0)return 1;
  if(dp3[a][b] != 0)return dp3[a][b];
  int &res = dp3[a][b];
  res = licz3(a-1,b-1) + licz3(a,b-1);
  if(res >= P)res -= P;
  return res;
}
int licz2(int a,int b){
  if(a == 0 || b == 0)return 1;
  if(dp2[a][b] != 0)return dp2[a][b];
  int &res = dp2[a][b];
  if(a)res += licz2(a-1,b);
  res += licz3(a,b-1);
  if(res >= P)res -= P;
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  R(i,MAX)R(j,i+1){
    if(j==0){
      dp[i][j] = 1;
    }else{
      dp[i][j] = dp[i-1][j] + dp[i-1][j-1];
      if(dp[i][j] >= P)dp[i][j] -= P;
    }
  }
  int a,b;
  cin >> a >> b;
  int res = 0;
  R(i,a+1){
    R(j,min(a-i+1,b)){
      res = (res + dp[b-1][j] * licz2(a-i-j, j) )% P;
    //  debug(j, res);
    }
    debug(i,res);
  }
  cout << res << "\n";
}
