Given an matrix of numbers between 1 and 9, compute how many subsquares it has with all the numbers between 1 and 9.
Input consists of several cases. Every case begins with and , followed by an matrix of integer numbers between 1 and 9. Suppose that and are between 3 and 100.
For every matrix, print the number of subsquares that have all the numbers between 1 and 9.
Input
3 4 1 2 3 4 5 6 7 8 9 8 4 8 3 3 1 1 1 1 1 1 1 1 1 4 4 1 2 3 7 4 5 6 4 7 8 9 1 1 2 3 7
Output
1 0 4