Problem: Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:

<image>

Find the sum modulo 1073741824 (230).

Input

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 2000).

Output

Print a single integer — the required sum modulo 1073741824 (230).

Examples

Input

2 2 2


Output

20


Input

4 4 4


Output

328


Input

10 10 10


Output

11536

Note

For the first example.

  * d(1·1·1) = d(1) = 1; 
  * d(1·1·2) = d(2) = 2; 
  * d(1·2·1) = d(2) = 2; 
  * d(1·2·2) = d(4) = 3; 
  * d(2·1·1) = d(2) = 2; 
  * d(2·1·2) = d(4) = 3; 
  * d(2·2·1) = d(4) = 3; 
  * d(2·2·2) = d(8) = 4. 



So the result is 1 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 20.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int prime[2005], miu[2005], v[2005];
int g[2001][2001];
int A, B, C, tot = 0;
long long ans = 0;
void get_miu() {
  miu[1] = 1;
  for (int i = 2; i <= 2001; i++) {
    if (!v[i]) v[i] = 1, miu[i] = -1, prime[++tot] = i;
    for (int j = 1; j <= tot && prime[j] <= (int)(2001 / i); j++) {
      v[prime[j] * i] = 1;
      if (i % prime[j] == 0) {
        miu[i * prime[j]] = 0;
        break;
      } else
        miu[i * prime[j]] = -miu[i];
    }
  }
}
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  scanf("%d %d %d", &A, &B, &C);
  int N = max(A, max(B, C));
  get_miu();
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++) g[i][j] = gcd(i, j);
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= A; j++)
      if (g[i][j] == 1) {
        int tmp1 = 0, tmp2 = 0;
        for (int k = 1; k <= B / i; k++)
          if (g[j][k] == 1) tmp1 += B / i / k;
        for (int k = 1; k <= C / i; k++)
          if (g[j][k] == 1) tmp2 += C / i / k;
        ans += (long long)(miu[i]) * (long long)(A / j) * (long long)(tmp1) *
               (long long)(tmp2);
      }
  }
  printf("%I64d\n", ans % 1073741824LL);
  return 0;
}