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>
unsigned int mu[10004], Smu[10004], cp[10004], Scp[10004], ans;
int a, b, c, n, prime[10004], tl, not_prime[10004];
void calc_mu() {
  mu[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!not_prime[i]) {
      prime[++tl] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= tl && i * prime[j] <= n; ++j) {
      not_prime[i * prime[j]] = 1;
      if (i % prime[j] == 0) {
        mu[i * prime[j]] = 0;
        break;
      } else
        mu[i * prime[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= n; ++i) Smu[i] = Smu[i - 1] + mu[i];
}
void calc_coprime(int x) {
  for (int i = 1; i <= n; ++i) cp[i] = 0;
  cp[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!not_prime[i]) {
      cp[i] = (x % i != 0);
      for (int j = i * i; j <= n; j *= i) {
        cp[j] = cp[i];
      }
    }
    for (int j = 1; j <= tl && prime[j] < i && i * prime[j] <= n; ++j) {
      cp[i * prime[j]] = cp[i] * cp[prime[j]];
      if (i % prime[j] == 0)
        break;
      else
        cp[i * prime[j]] = cp[i] * cp[prime[j]];
    }
  }
  for (int i = 1; i <= n; ++i) Scp[i] = Scp[i - 1] + cp[i];
}
unsigned int W(int k) {
  unsigned int ans = 0;
  for (int l = 1, r; l <= k; l = r + 1) {
    r = k / (k / l);
    ans += (Scp[r] - Scp[l - 1]) * (k / l);
  }
  return ans;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  n = std::max({a, b, c});
  calc_mu();
  for (int i = 1; i <= a; ++i) {
    unsigned int coef = a / i;
    calc_coprime(i);
    int px = 0, py = 0, pans = 0;
    for (int d = 1; d <= n; ++d) {
      if ((!cp[d]) || (!mu[d])) continue;
      int x = b / d, y = c / d;
      unsigned int res;
      if (x != px || y != py) {
        res = W(x) * W(y);
        px = x;
        py = y;
        pans = res;
      } else
        res = pans;
      ans += res * mu[d] * coef;
    }
  }
  std::cout << ans % 1073741824;
  return 0;
}