#include <bits/stdc++.h>
using namespace std;
const int mo = 1073741823;
int A, B, C, cnt;
int mu[2005], prime[2005], gd[2005][2005];
bool vis[2005];
int gcd(int x, int y) { return !y ? x : gcd(y, x % y); }
void pre() {
  mu[1] = 1;
  for (int i = 2; i <= 2000; ++i) {
    if (!vis[i]) {
      mu[i] = -1;
      prime[++cnt] = i;
    }
    for (int j = 1; j <= cnt && prime[j] * i <= 2000; ++j) {
      int v = prime[j] * i;
      if (i % prime[j] == 0) {
        vis[v] = 1;
        mu[v] = 0;
        break;
      }
      vis[v] = 1;
      mu[v] = -mu[i];
    }
  }
  for (int i = 1; i <= 2000; ++i)
    for (int j = 1; j <= 2000; ++j) gd[i][j] = gcd(i, j);
}
int inc(int x, int y) { return x + y >= mo ? x + y - mo : x + y; }
int main() {
  pre();
  scanf("%d%d%d", &A, &B, &C);
  int P = min(B, C);
  int ans = 0;
  for (int i = 1; i <= A; ++i) {
    for (int d = 1; d <= P; ++d)
      if (mu[d] != 0 && gd[i][d] == 1) {
        int res1 = 0, res2 = 0;
        for (int j = 1; j <= B / d; ++j)
          if (gd[i][j * d] == 1) res1 = (res1 + (B / (j * d))) & mo;
        for (int j = 1; j <= C / d; ++j)
          if (gd[i][j * d] == 1) res2 = (res2 + (C / (j * d))) & mo;
        int res = A / i;
        res = ((((res1 * res2) & mo) * res) & mo) * mu[d];
        ans = (ans + res) & mo;
      }
  }
  printf("%d\n", ans < 0 ? ans + mo : 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 mo = 1073741823;
int A, B, C, cnt;
int mu[2005], prime[2005], gd[2005][2005];
bool vis[2005];
int gcd(int x, int y) { return !y ? x : gcd(y, x % y); }
void pre() {
  mu[1] = 1;
  for (int i = 2; i <= 2000; ++i) {
    if (!vis[i]) {
      mu[i] = -1;
      prime[++cnt] = i;
    }
    for (int j = 1; j <= cnt && prime[j] * i <= 2000; ++j) {
      int v = prime[j] * i;
      if (i % prime[j] == 0) {
        vis[v] = 1;
        mu[v] = 0;
        break;
      }
      vis[v] = 1;
      mu[v] = -mu[i];
    }
  }
  for (int i = 1; i <= 2000; ++i)
    for (int j = 1; j <= 2000; ++j) gd[i][j] = gcd(i, j);
}
int inc(int x, int y) { return x + y >= mo ? x + y - mo : x + y; }
int main() {
  pre();
  scanf("%d%d%d", &A, &B, &C);
  int P = min(B, C);
  int ans = 0;
  for (int i = 1; i <= A; ++i) {
    for (int d = 1; d <= P; ++d)
      if (mu[d] != 0 && gd[i][d] == 1) {
        int res1 = 0, res2 = 0;
        for (int j = 1; j <= B / d; ++j)
          if (gd[i][j * d] == 1) res1 = (res1 + (B / (j * d))) & mo;
        for (int j = 1; j <= C / d; ++j)
          if (gd[i][j * d] == 1) res2 = (res2 + (C / (j * d))) & mo;
        int res = A / i;
        res = ((((res1 * res2) & mo) * res) & mo) * mu[d];
        ans = (ans + res) & mo;
      }
  }
  printf("%d\n", ans < 0 ? ans + mo : ans);
  return 0;
}

```