#include <bits/stdc++.h>
using namespace std;
int a, b, c, n;
int prime[2005];
bool mark[2005];
map<pair<int, int>, long long> f[2005][2005];
long long dfs(int a, int b, int c, int n) {
  if (!n) return 1;
  int p = prime[n];
  long long ret = 0;
  pair<int, int> now(c, n);
  if (f[a][b].count(now)) return f[a][b][now];
  for (int i = 0, x = 1; x <= a; i++, x *= p)
    for (int j = 0, y = 1; y <= b; j++, y *= p)
      for (int k = 0, z = 1; z <= c; k++, z *= p) {
        int tmp[3] = {a / x, b / y, c / z};
        sort(tmp, tmp + 3);
        ret += dfs(tmp[0], tmp[1], tmp[2], n - 1) * (i + j + k + 1);
      }
  return f[a][b][now] = ret;
}
int main() {
  cin >> a >> b >> c;
  if (a > b) swap(a, b);
  if (a > c) swap(a, c);
  if (b > c) swap(b, c);
  memset(mark, 1, sizeof(mark));
  for (int i = 2; i <= a || i <= b || i <= c; i++)
    if (mark[i]) {
      prime[++n] = i;
      for (int j = i * i; j <= 2000; j += i) mark[j] = 0;
    }
  cout << dfs(a, b, c, n) % (1ll << 30) << endl;
  return 0;
}

### Prompt

In cpp, your task is to solve 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;
int a, b, c, n;
int prime[2005];
bool mark[2005];
map<pair<int, int>, long long> f[2005][2005];
long long dfs(int a, int b, int c, int n) {
  if (!n) return 1;
  int p = prime[n];
  long long ret = 0;
  pair<int, int> now(c, n);
  if (f[a][b].count(now)) return f[a][b][now];
  for (int i = 0, x = 1; x <= a; i++, x *= p)
    for (int j = 0, y = 1; y <= b; j++, y *= p)
      for (int k = 0, z = 1; z <= c; k++, z *= p) {
        int tmp[3] = {a / x, b / y, c / z};
        sort(tmp, tmp + 3);
        ret += dfs(tmp[0], tmp[1], tmp[2], n - 1) * (i + j + k + 1);
      }
  return f[a][b][now] = ret;
}
int main() {
  cin >> a >> b >> c;
  if (a > b) swap(a, b);
  if (a > c) swap(a, c);
  if (b > c) swap(b, c);
  memset(mark, 1, sizeof(mark));
  for (int i = 2; i <= a || i <= b || i <= c; i++)
    if (mark[i]) {
      prime[++n] = i;
      for (int j = i * i; j <= 2000; j += i) mark[j] = 0;
    }
  cout << dfs(a, b, c, n) % (1ll << 30) << endl;
  return 0;
}

```