Little Nikola has recently learned a multiplication table. To try to continue learning, he came up with the following task.
He made a table of size
Since currently he has no time, he has asked you for help. Since the required number of ways can be
quite large, just print its remainder of division by
Input
In the first line there are integer numbers
In the next
Output
In the only line print the remainder of the required number of the ways modulo
Scoring
In the test samples totally worth 20% of the points it will hold
In the test samples totally worth 20% of the points it will hold
In the test samples totally worth additional 30% it will hold
Sample Input 1
2 3 200
2 3 4
5 6 7
Sample Output 1
2
Explanation for Sample Output 1
There are three possible ways:
- total product - total product - total product
Sample Input 2
3 3 90
2 1 1
45 1 1
1 1 1
Sample Output 2
3
Sample Input 3
2 5 3000
1 2 3 4 5
6 7 8 9 10
Sample Output 3
3
Comments