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;
inline int Get() {
  int res = 0, q = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') q = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') res = res * 10 + ch - '0', ch = getchar();
  return res * q;
}
const double eps = 1e-12, pi = M_PI;
const int oo = (int)2e9, mod = 1 << 30;
const long long INF = (long long)1e17;
const int N = 2000;
typedef int arr[N + 10];
int a, b, c, m;
long long dt, ans;
arr prm, mu;
bool pri[N + 10];
int Gcd(int x, int y) { return y ? Gcd(y, x % y) : x; }
void Prepare() {
  mu[1] = 1;
  for (int i = (2), end = (N); i <= end; ++i) {
    if (!pri[i]) prm[++m] = i, mu[i] = -1;
    for (int j = (1), end = (m); j <= end; ++j) {
      if (i * prm[j] > N) break;
      pri[i * prm[j]] = 1;
      if (i % prm[j] == 0) {
        mu[i * prm[j]] = 0;
        break;
      } else
        mu[i * prm[j]] = -mu[i];
    }
  }
}
int main() {
  scanf(
      "%d"
      "%d"
      "%d"
      "\n",
      &a, &b, &c);
  Prepare();
  for (int i = (1), end = (min(a, b)); i <= end; ++i)
    if (mu[i]) {
      for (int j = (1), end = (c); j <= end; ++j)
        if (Gcd(i, j) == 1) {
          long long cx = 0, cy = 0;
          for (int k = (1), end = (a / i); k <= end; ++k)
            if (Gcd(j, k) == 1) cx += (long long)(a / i / k);
          for (int k = (1), end = (b / i); k <= end; ++k)
            if (Gcd(j, k) == 1) cy += (long long)(b / i / k);
          ans = (ans + mu[i] * (long long)(c / j) % mod * cx * cy % mod) % mod;
        }
    }
  ans %= mod;
  printf(
      "%I64d"
      "\n",
      ans >= 0 ? ans : ans + mod);
  return 0;
}