Write a program that determines how many K -digit numbers are in the matrix, the sum of the digits of each of which is a multiple of R .

Input
The first line contains, separated by a space, the dimensions of the matrix: the number of rows Nand the number of columns M (\(1 <= N , M <= 100\)). The following Nlines contain matrix rows, each – by Mnatural numbers separated by spaces. Then the numbers Kand R.

are entered on two separate lines.

Imprint
The program should output one number – the number of K-digit numbers, the sum of the digits of each of which is a multiple of R.