You are given two integers $n$ and $m$. Calculate the number of pairs of arrays $(a, b)$ such that:

  the length of both arrays is equal to $m$;  each element of each array is an integer between $1$ and $n$ (inclusive);  $a_i \le b_i$ for any index $i$ from $1$ to $m$;  array $a$ is sorted in non-descending order;  array $b$ is sorted in non-ascending order. 

As the result can be very large, you should print it modulo $10^9+7$.


-----Input-----

The only line contains two integers $n$ and $m$ ($1 \le n \le 1000$, $1 \le m \le 10$).


-----Output-----

Print one integer – the number of arrays $a$ and $b$ satisfying the conditions described above modulo $10^9+7$.


-----Examples-----
Input
2 2

Output
5

Input
10 1

Output
55

Input
723 9

Output
157557417



-----Note-----

In the first test there are $5$ suitable arrays:   $a = [1, 1], b = [2, 2]$;  $a = [1, 2], b = [2, 2]$;  $a = [2, 2], b = [2, 2]$;  $a = [1, 1], b = [2, 1]$;  $a = [1, 1], b = [1, 1]$.

Difficulty: interview

Starter code:

Solutions:
n, m = list(map(int,input().split()))

M = 10 ** 9 + 7

def inv(x):
    return pow(x, M - 2, M)

def binomial(n, k):
    if 0 <= k <= n:
        ntok = 1
        ktok = 1
        for t in range(1, min(k, n - k) + 1):
            ntok *= n
            ktok *= t
            n -= 1
            ntok %= M
            ktok %= M
        return (ntok * inv(ktok))%M
    else:
        return 0

print(binomial(n+2*m-1, 2 * m))


#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
MOD = 10**9 + 7
MAX_N = 2000 

def single_mod_nCr(n, r):
    if n < r or n < 0 or r < 0:
        return 0
    if r > n - r:
        r = n - r
    ret = 1
    for i in range(r):
        ret *= n - i
        ret *= pow(i+1, MOD-2, MOD)
        ret %= MOD
    return ret

n, m = [int(item) for item in input().split()]
print(single_mod_nCr(n+m*2-1, m*2))

n,m = list(map(int, input().split()))
mod = 10**9+7

DP = [0]*(n+1)
DP[0] = 1
for i in range(m):
    nxt = [0]*(n+1)
    cnt = DP[0]
    for i in range(1, n+1):
        cnt += DP[i]
        cnt %= mod
        nxt[i] = cnt
    DP = nxt

cnt = 0
ans = 0
for i in reversed(list(range(1,n+1))):
    cnt += DP[n-i+1]
    ans += DP[i]*cnt
    ans %= mod
print(ans)


import math

MOD = 1000000007

def main():
    (n, m) = ([int(x) for x in input().split()])
    m *= 2
    a = [0] * n
    a[0] = 1
    for i in range(m):
        b = [0] * n
        sum = a[0]
        b[0] = a[0]
        for j in range(1, n):
            sum = (sum + a[j]) % MOD
            b[j] = sum
        a = b
    result = 0
    for i in range(n):
        result = (result + a[i]) % MOD
    print(result)

def __starting_point():
    main()

__starting_point()

#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n,m = LI()
    f = [1]
    N = 10**6
    for i in range(1,N+1):
        f.append(f[-1]*i%mod)
    inv = [None]*(N+1)
    inv[N] = pow(f[N],mod-2,mod)
    for i in range(N)[::-1]:
        inv[i] = inv[i+1]*(i+1)%mod
    print(f[2*m+n-1]*inv[n-1]*inv[2*m]%mod)
    return

#Solve
def __starting_point():
    solve()

__starting_point()

def calc(n, m):
    r = 1
    for i in range(n, n+2*m):
        r *= i
    for i in range(1, 2*m+1):
        r //= i
    return r % (10**9+7)

# T = int(input())
T = 1
for _ in range(T):
    a, b = [int(x) for x in input().split()]
    print(calc(a, b))


import sys
readline = sys.stdin.readline

MOD = 10**9+7

N, M = map(int, readline().split())

dp = [0] + [1]*N

for _ in range(2*M):
    dp2 = dp[:]
    for i in range(1, N+1):
        dp2[i] = (dp2[i]+dp2[i-1])%MOD
    dp = dp2[:]
print(dp[N])

n, mm = map(int,input().split())
mod = 10**9+7

l = 10**4

M = [1]  # i!のmod
m = 1
for i in range(1, l):
    m = (m * i) % mod
    M.append(m)

def pow(x, y, mod):  # x**y の mod を返す関数
    ans = 1
    while y > 0:
        if y % 2 == 1:
            ans = (ans * x) % mod
        x = (x**2) % mod
        y //= 2
    return ans

def inv(x, mod):  # x の mod での逆元を返す関数
    return pow(x, mod-2, mod)

# print(inv(8,13))

MI = [0] * (l-1) +[inv(M[l-1], mod)]  # i!の逆元
for i in range(l-2, -1, -1):
    MI[i] = MI[i+1] * (i+1) % mod

def C(x, y):  # コンビネーション
    if y < 0 or y > x:
        return 0
    ans = M[x]
    ans = (ans * MI[y]) % mod
    return (ans * MI[x-y]) % mod

ans = 0
for i in range(n):
    # print(mm-1+i, i),(mm, n-i-1)
    ans = (ans + C(mm-1+i, i) * C(mm+n-i-1, n-i-1)) % mod
print(ans)

n_=2*10**3
mod=10**9+7
fac=[1]*(n_+1)
for i in range(1,n_+1):
    fac[i]=fac[i-1]*i%mod
inv =[1]*(n_+1)
inv[n_]=pow(fac[n_],mod-2,mod)
for i in range(n_-1,0,-1):
    inv[i]=inv[i+1]*(i+1)%mod
def nCr(n,r):
    if n<=0 or r<0 or r>n:
        return 0
    return fac[n]*inv[r]%mod*inv[n-r]%mod

n,m=map(int,input().split())
ans=nCr(n+2*m-1,n-1)
print(ans)

# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List

"""
created by shhuan at 2020/1/14 22:56

"""


def solve(N, M):
    MOD = 10 ** 9 + 7
    dp = [[0 for _ in range(N+1)] for _ in range(1 + M)]
    for v in range(1, N+1):
        dp[1][v] = 1
    for i in range(2, M+1):
        for v in range(1, N+1):
            dp[i][v] = sum([dp[i-1][u] for u in range(1, v+1)])
            dp[i][v] %= MOD

    dp2 = [[0 for _ in range(N+1)] for _ in range(1 + M)]
    for v in range(1, N+1):
        dp2[1][v] = 1
    for i in range(2, M+1):
        for v in range(1, N+1):
            dp2[i][v] = sum([dp2[i-1][u] for u in range(v, N+1)])
            dp2[i][v] %= MOD

    ans = 0
    for v in range(1, N+1):
        ans += sum([dp[M][v] * dp2[M][u] for u in range(v, N+1)])
        ans %= MOD

    return ans


N, M = map(int, input().split())
print(solve(N, M))