#include <bits/stdc++.h>
using namespace std;
const int MAXSIZE = 10000020;
int bufpos;
char buf[MAXSIZE];
void init() {
  buf[fread(buf, 1, MAXSIZE, stdin)] = '\0';
  bufpos = 0;
}
int readint() {
  int val = 0;
  for (; !isdigit(buf[bufpos]); bufpos++)
    ;
  for (; isdigit(buf[bufpos]); bufpos++) val = val * 10 + buf[bufpos] - '0';
  return val;
}
char readchar() {
  for (; isspace(buf[bufpos]); bufpos++)
    ;
  return buf[bufpos++];
}
int readstr(char* s) {
  int cur = 0;
  for (; isspace(buf[bufpos]); bufpos++)
    ;
  for (; !isspace(buf[bufpos]); bufpos++) s[cur++] = buf[bufpos];
  s[cur] = '\0';
  return cur;
}
int mu[5002], f[5002], c[5002];
void sieve(int n) {
  mu[1] = 1;
  for (int i = 1; i <= n; i++) {
    f[i]++;
    for (int j = i * 2; j <= n; j += i) mu[j] -= mu[i], f[j]++;
  }
  for (int i = 1; i <= n; i++) f[i] += f[i - 1];
}
int lcm__[5002][5002];
int deg[5002];
vector<int> a[5002];
int main() {
  init();
  int x = readint(), y = readint(), z = readint(), n = max(max(x, y), z);
  sieve(n);
  for (int i = 1; i <= n; i++) {
    lcm__[i][0] = lcm__[0][i] = i;
    for (int j = 1; j <= i; j++) lcm__[i][j] = lcm__[j][i] = lcm__[j][i % j];
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) lcm__[i][j] = i * j / lcm__[i][j];
  int ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (lcm__[i][j] <= n) {
        a[i].push_back(j);
        a[j].push_back(i);
      }
  for (int i = 1; i <= n; i++) {
    int u = i;
    for (int j = 0; j < a[i].size(); j++) {
      int v = a[i][j];
      if (a[v].size() > a[i].size() || (a[v].size() == a[i].size() && i < v)) {
        for (int k = 0; k < a[i].size(); k++) {
          int w = a[i][k];
          if (lcm__[v][w] <= n && w != v) {
            ans +=
                mu[w] * mu[u] * mu[v] *
                (f[x / lcm__[u][v]] * f[y / lcm__[v][w]] * f[z / lcm__[u][w]] +
                 f[x / lcm__[u][v]] * f[y / lcm__[u][w]] * f[z / lcm__[v][w]]);
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < a[i].size(); j++) {
      int v = a[i][j], lc = lcm__[i][v];
      ans +=
          mu[i] * mu[i] * mu[v] *
          (f[x / i] * f[y / lc] * f[z / lc] + f[x / lc] * f[y / i] * f[z / lc] +
           f[x / lc] * f[y / lc] * f[z / i]);
    }
    ans += mu[i] * mu[i] * mu[i] * f[x / i] * f[y / i] * f[z / i];
  }
  printf("%d", ans & ((1 << 30) - 1));
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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 MAXSIZE = 10000020;
int bufpos;
char buf[MAXSIZE];
void init() {
  buf[fread(buf, 1, MAXSIZE, stdin)] = '\0';
  bufpos = 0;
}
int readint() {
  int val = 0;
  for (; !isdigit(buf[bufpos]); bufpos++)
    ;
  for (; isdigit(buf[bufpos]); bufpos++) val = val * 10 + buf[bufpos] - '0';
  return val;
}
char readchar() {
  for (; isspace(buf[bufpos]); bufpos++)
    ;
  return buf[bufpos++];
}
int readstr(char* s) {
  int cur = 0;
  for (; isspace(buf[bufpos]); bufpos++)
    ;
  for (; !isspace(buf[bufpos]); bufpos++) s[cur++] = buf[bufpos];
  s[cur] = '\0';
  return cur;
}
int mu[5002], f[5002], c[5002];
void sieve(int n) {
  mu[1] = 1;
  for (int i = 1; i <= n; i++) {
    f[i]++;
    for (int j = i * 2; j <= n; j += i) mu[j] -= mu[i], f[j]++;
  }
  for (int i = 1; i <= n; i++) f[i] += f[i - 1];
}
int lcm__[5002][5002];
int deg[5002];
vector<int> a[5002];
int main() {
  init();
  int x = readint(), y = readint(), z = readint(), n = max(max(x, y), z);
  sieve(n);
  for (int i = 1; i <= n; i++) {
    lcm__[i][0] = lcm__[0][i] = i;
    for (int j = 1; j <= i; j++) lcm__[i][j] = lcm__[j][i] = lcm__[j][i % j];
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) lcm__[i][j] = i * j / lcm__[i][j];
  int ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (lcm__[i][j] <= n) {
        a[i].push_back(j);
        a[j].push_back(i);
      }
  for (int i = 1; i <= n; i++) {
    int u = i;
    for (int j = 0; j < a[i].size(); j++) {
      int v = a[i][j];
      if (a[v].size() > a[i].size() || (a[v].size() == a[i].size() && i < v)) {
        for (int k = 0; k < a[i].size(); k++) {
          int w = a[i][k];
          if (lcm__[v][w] <= n && w != v) {
            ans +=
                mu[w] * mu[u] * mu[v] *
                (f[x / lcm__[u][v]] * f[y / lcm__[v][w]] * f[z / lcm__[u][w]] +
                 f[x / lcm__[u][v]] * f[y / lcm__[u][w]] * f[z / lcm__[v][w]]);
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < a[i].size(); j++) {
      int v = a[i][j], lc = lcm__[i][v];
      ans +=
          mu[i] * mu[i] * mu[v] *
          (f[x / i] * f[y / lc] * f[z / lc] + f[x / lc] * f[y / i] * f[z / lc] +
           f[x / lc] * f[y / lc] * f[z / i]);
    }
    ans += mu[i] * mu[i] * mu[i] * f[x / i] * f[y / i] * f[z / i];
  }
  printf("%d", ans & ((1 << 30) - 1));
}

```