PivotOJ

ZBRKA

시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2006-2007BOJ 3037

문제

Consider a sequence of N integers where each integer between 1 and N appears exactly once. 

A pair of numbers in the sequence is confused if the number that comes earlier in the sequence is larger than the later number. 

The confusion of the sequence is the number of confused pairs in it. For example, the confusion of the sequence (1, 4, 3, 2) is 3 because there are 3 confused pairs: (4, 3), (4, 2) and (3, 2). 

Write a program that calculates the number of sequences of length N whose confusion is exactly C. 

입력

The first and only line of input contains two integers, N (1 ≤ N ≤ 1000) and C (0 ≤ C ≤ 10000). 

 

출력

Output the number of sequences modulo 1000000007. 

 

예제

예제 1

입력
10 1
출력
9

예제 2

입력
4 3
출력
6

예제 3

입력
9 13
출력
17957
코드를 제출하려면 로그인하세요.