Problem: Snuke loves colorful balls. He has a total of N×K balls, K in each of his favorite N colors. The colors are numbered 1 through N.

He will arrange all of the balls in a row from left to right, in arbitrary order. Then, for each of the N colors, he will paint the leftmost ball of that color into color 0, a color different from any of the N original colors.

After painting, how many sequences of the colors of the balls are possible? Find this number modulo 10^9+7.

Constraints

* 1≤N,K≤2,000

Input

The input is given from Standard Input in the following format:


N K


Output

Print the number of the possible sequences of the colors of the balls after painting, modulo 10^9+7.

Examples

Input

2 2


Output

4


Input

3 1


Output

1


Input

2 3


Output

14


Input

2000 2000


Output

546381702

Solution (in CPP):

Solution:
#include<cstdio>
#include<cstring>
#include<algorithm>
#define rep(a,b,c) for (int a=b;a<=c;a++)
#define per(a,b,c) for (int a=b;a>=c;a--)
#define go(u) for (int o=ft[u],v;v=E[o].t;o=E[o].n)
#define fi first
#define se second
using namespace std;
typedef long long LL;
typedef pair<int,int> par;
const int P=1000000007; 
const int N=4000010;
LL inv[N],s1[N],s2[N],f[2010][2010];
int n,k;
void upd(LL &x,LL y){x=(x+y)%P;}
LL C(LL n,LL m){return s1[n]*s2[m]%P*s2[n-m]%P;}
int main(){
	scanf("%d%d",&n,&k);
	inv[1]=1;
	rep(i,2,n*k) inv[i]=inv[P%i]*(P-P/i)%P;
	s1[0]=s2[0]=1;
	rep(i,1,n*k) s1[i]=s1[i-1]*i%P,s2[i]=s2[i-1]*inv[i]%P;
	if (k==1) return puts("1"),0;
	--k;
	f[0][0]=1;
	rep(i,0,n) rep(j,0,i){
		LL s=i*k+j,fx=f[i][j];
		upd(f[i+1][j],fx*C(s+k-1,k-1)%P*(n-i));
		upd(f[i][j+1],fx);
	}
	printf("%lld\n",f[n][n]);
	return 0;
}