Number of Divisors

Given a, b, c up to 2000, compute the sum over all i<=a, j<=b, k<=c of the divisor count of i*j*k, modulo 2^30.

Hard8Number theoryMathCombinatoricsDynamic programmingNo attempts yetTime limit2sMemory limit512 MB

Problem

Let d(n)d(n) be the number of divisors of a positive integer nn.

Given three integers aa, bb, and cc, write a program that computes the value of the following sum.

i=1aj=1bk=1cd(i×j×k)\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{c} d(i \times j \times k)

Input

The first line contains aa, bb, and cc, separated by spaces. (1a,b,c20001 \le a, b, c \le 2000)

Output

Print the value of the sum modulo 2302^{30} on the first line. 2302^{30} is 1073741824.