Alan has an by array of integers . Alan knows that he can make rectangles in the array and sum the elements contained in the rectangle, and calls it a "rectangle-sum". He wondered about sum of all rectangle-sums for all possible rectangles, but because Alan is too good at math, he already figured out the answer. Instead, he asks you to find the sum of all rectangle-sums for all rectangles where both dimensions are less than or equal to (the length/width of a rectangle is how many elements it spans). Because this number can be very large, Alan asks for it modulo . Can you help Alan?
Input Specification
The first line will contain 3 integers .
Output Specification
Output the answer to Alan's question, modulo .
Subtasks
Subtask 1 [20%]
Subtask 2 [30%]
Subtask 3 [50%]
Sample Input
3 3 2
Sample Output
49
Comments