Given a matrix of size

and an integer

, where
)
, the least common multiple of

and

. You should determine the sum of the maximums among all

submatrices.
输入描述:
Only one line containing three integers
.
输出描述:
Only one line containing one integer, denoting the answer.