Task
Mihnea is in some serious trouble! He forgot to turn in his homework which is crucial to his final grade.
He was tasked to find an array of length , such that for every element () in the array, and the sum of all elements in the array modulo is equal to ().
After he bargains with the teacher, in order for him to pass he is now tasked to find the number of different arrays that satisfy this property, since this value can be too big print the answer modulo .
Because of his laziness, he asked you to solve this problem for him.
Input
The input contains a single line with five integers (), () (), ().
For tests worth points: Examples.
For tests worth points: ; ; .
For tests worth points:. ; ; .
For tests worth points: ; .
For tests worth points: .
For tests worth points: .
For tests worth points: No additional limitations.
Output
You need to write a single line with an integer: the number of array that satisfy the initial task modulo
Example 1
stdin
2 7 1 7 0
stdout
7
Example 2
stdin
3 7 27 29 3
stdout
1
Example 3
stdin
100 17 55 123 7
stdout
56460584
Notes
In the first sample case, the possible arrays are:
.
In the second sample case, the only possible array is:
.