#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2010;
const long long mod = (long long)1 << 30;
int prime_cnt, prime[MAX_N], mu[MAX_N], gcd[MAX_N][MAX_N];
bitset<MAX_N> bs;
void GetMu() {
  prime_cnt = 0;
  bs.set();
  mu[1] = 1;
  for (int i = 2; i < MAX_N; ++i) {
    if (bs[i]) {
      prime[prime_cnt++] = i;
      mu[i] = -1;
    }
    for (int j = 0; j < prime_cnt && i * prime[j] < MAX_N; ++j) {
      bs[i * prime[j]] = 0;
      if (i % prime[j]) {
        mu[i * prime[j]] = -mu[i];
      } else {
        mu[i * prime[j]] = 0;
        break;
      }
    }
  }
}
inline int GCD(int a, int b) {
  if (gcd[a][b])
    return gcd[a][b];
  else
    return b == 0 ? a : gcd[a][b] = GCD(b, a % b);
}
void GetGcd() {
  for (int i = 1; i < MAX_N; i++) {
    for (int j = i; j < MAX_N; j++) {
      gcd[i][j] = gcd[j][i] = GCD(i, j);
    }
  }
}
long long work(int n, int x) {
  long long res = 0;
  for (int i = 1; i <= n; ++i) {
    if (gcd[i][x] == 1) {
      res = (res + (n / i)) % mod;
    }
  }
  return res;
}
inline long long solve(int a, int b, int c) {
  long long res = 0;
  int top = min(b, c);
  for (int i = 1; i <= a; ++i) {
    for (int d = 1; d <= top; ++d) {
      if (gcd[i][d] == 1) {
        long long tmp = 0;
        tmp = (long long)(a / i) * mu[d] * work(b / d, i) % mod *
              work(c / d, i) % mod;
        res = ((res + tmp) % mod + mod) % mod;
      }
    }
  }
  return res;
}
int main() {
  GetMu();
  GetGcd();
  int a, b, c;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    printf("%I64d\n", solve(a, b, c));
  }
  return 0;
}

### Prompt

Your task is to create a CPP solution to the following 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2010;
const long long mod = (long long)1 << 30;
int prime_cnt, prime[MAX_N], mu[MAX_N], gcd[MAX_N][MAX_N];
bitset<MAX_N> bs;
void GetMu() {
  prime_cnt = 0;
  bs.set();
  mu[1] = 1;
  for (int i = 2; i < MAX_N; ++i) {
    if (bs[i]) {
      prime[prime_cnt++] = i;
      mu[i] = -1;
    }
    for (int j = 0; j < prime_cnt && i * prime[j] < MAX_N; ++j) {
      bs[i * prime[j]] = 0;
      if (i % prime[j]) {
        mu[i * prime[j]] = -mu[i];
      } else {
        mu[i * prime[j]] = 0;
        break;
      }
    }
  }
}
inline int GCD(int a, int b) {
  if (gcd[a][b])
    return gcd[a][b];
  else
    return b == 0 ? a : gcd[a][b] = GCD(b, a % b);
}
void GetGcd() {
  for (int i = 1; i < MAX_N; i++) {
    for (int j = i; j < MAX_N; j++) {
      gcd[i][j] = gcd[j][i] = GCD(i, j);
    }
  }
}
long long work(int n, int x) {
  long long res = 0;
  for (int i = 1; i <= n; ++i) {
    if (gcd[i][x] == 1) {
      res = (res + (n / i)) % mod;
    }
  }
  return res;
}
inline long long solve(int a, int b, int c) {
  long long res = 0;
  int top = min(b, c);
  for (int i = 1; i <= a; ++i) {
    for (int d = 1; d <= top; ++d) {
      if (gcd[i][d] == 1) {
        long long tmp = 0;
        tmp = (long long)(a / i) * mu[d] * work(b / d, i) % mod *
              work(c / d, i) % mod;
        res = ((res + tmp) % mod + mod) % mod;
      }
    }
  }
  return res;
}
int main() {
  GetMu();
  GetGcd();
  int a, b, c;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    printf("%I64d\n", solve(a, b, c));
  }
  return 0;
}

```