#include <bits/stdc++.h>
using namespace std;
const int LIM = 2000;
const int mod = (1 << 30) - 1;
bool inv[LIM + 10];
int p[LIM + 10], mu[LIM + 10], d[LIM + 10], f[LIM + 10];
int tot;
int ch[LIM + 10][10], v[LIM + 10][32];
void getPrime(int n, int p[], int& tot) {
  inv[0] = inv[1] = 1;
  mu[0] = 0;
  for (int i = 1; i <= n; i++) mu[i] = d[i] = 1;
  for (int i = 2; i <= n; i++)
    if (!inv[i]) {
      mu[i] = -1;
      d[i] = 2;
      ch[i][ch[i][0] = 1] = i;
      for (int j = i + i; j <= n; j += i) {
        inv[j] = 1;
        mu[j] = -mu[j];
        ch[j][++ch[j][0]] = i;
        int x = j, cnt = 1;
        while (x /= i, x % i == 0) cnt++;
        d[j] *= (cnt + 1);
        if (cnt > 1) mu[j] = 0;
      }
    }
  for (int i = 1; i <= n; i++) f[i] = f[i - 1] + d[i];
}
void dfs(int u, int dep, int status, int value) {
  if (dep > ch[u][0]) {
    v[u][status] = value;
    return;
  }
  dfs(u, dep + 1, status, value);
  dfs(u, dep + 1, status | (1 << dep - 1), value * ch[u][dep]);
}
inline int gcd(int a, int b) {
  int c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  getPrime(LIM, p, tot);
  for (int i = 1; i <= LIM; i++) {
    dfs(i, 1, 0, 1);
  }
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  int ans = 0;
  for (int i = 1; i <= a; i++)
    for (int j = 1; j <= b; j++)
      if (gcd(i, j) == 1) {
        for (int p = 0, L1 = 1 << ch[i][0]; p < L1; p++)
          for (int q = 0, L2 = 1 << ch[j][0]; q < L2; q++) {
            int d1 = v[i][p], d2 = v[j][q];
            int tmp = ((long long)(a / i) * (b / j) * f[c / d1 / d2] * mu[d1] *
                       mu[d2]) &
                      mod;
            ans += tmp;
            ans &= mod;
          }
      }
  printf("%d\n", ans);
  return 0;
}

### Prompt

Your challenge is to write 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 LIM = 2000;
const int mod = (1 << 30) - 1;
bool inv[LIM + 10];
int p[LIM + 10], mu[LIM + 10], d[LIM + 10], f[LIM + 10];
int tot;
int ch[LIM + 10][10], v[LIM + 10][32];
void getPrime(int n, int p[], int& tot) {
  inv[0] = inv[1] = 1;
  mu[0] = 0;
  for (int i = 1; i <= n; i++) mu[i] = d[i] = 1;
  for (int i = 2; i <= n; i++)
    if (!inv[i]) {
      mu[i] = -1;
      d[i] = 2;
      ch[i][ch[i][0] = 1] = i;
      for (int j = i + i; j <= n; j += i) {
        inv[j] = 1;
        mu[j] = -mu[j];
        ch[j][++ch[j][0]] = i;
        int x = j, cnt = 1;
        while (x /= i, x % i == 0) cnt++;
        d[j] *= (cnt + 1);
        if (cnt > 1) mu[j] = 0;
      }
    }
  for (int i = 1; i <= n; i++) f[i] = f[i - 1] + d[i];
}
void dfs(int u, int dep, int status, int value) {
  if (dep > ch[u][0]) {
    v[u][status] = value;
    return;
  }
  dfs(u, dep + 1, status, value);
  dfs(u, dep + 1, status | (1 << dep - 1), value * ch[u][dep]);
}
inline int gcd(int a, int b) {
  int c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  getPrime(LIM, p, tot);
  for (int i = 1; i <= LIM; i++) {
    dfs(i, 1, 0, 1);
  }
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  int ans = 0;
  for (int i = 1; i <= a; i++)
    for (int j = 1; j <= b; j++)
      if (gcd(i, j) == 1) {
        for (int p = 0, L1 = 1 << ch[i][0]; p < L1; p++)
          for (int q = 0, L2 = 1 << ch[j][0]; q < L2; q++) {
            int d1 = v[i][p], d2 = v[j][q];
            int tmp = ((long long)(a / i) * (b / j) * f[c / d1 / d2] * mu[d1] *
                       mu[d2]) &
                      mod;
            ans += tmp;
            ans &= mod;
          }
      }
  printf("%d\n", ans);
  return 0;
}

```