public int find(int N, int K) {
		final int mod = 1000000007;
		long[][] dp = new long[49][1000];
		dp[0][0] = 1;
		for (int cowCount = 0; cowCount < N; cowCount++) {
			for (int i = 47; i >= 0; i--) {
				for (int j = 0;j  < N; j++) {
					dp[i + 1][(j + cowCount) % N] += dp[i][j];
					dp[i + 1][(j + cowCount) % N] %= mod;
				}
			}
		}
		return (int) dp[K][0];
	}