#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1 << 30;
const double PI = acos(-1.0);
const double eps = 1e-9;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long gg[2007][2007];
int mu[2007];
inline long long solve(long long a, long long d, long long z) {
  if (gg[d][z] != 1) return 0;
  long long r = 0;
  for (int x = 1, l = a / d; x <= l; ++x)
    if (gg[x][z] == 1) {
      r += a / (x * d);
      if (r >= MOD) r -= MOD;
    }
  return r;
}
int main() {
  for (int i = int(0); i <= int(2006); ++i)
    for (int j = int(i); j <= int(2006); ++j) gg[i][j] = gg[j][i] = gcd(i, j);
  memset(mu, -1, sizeof(mu));
  mu[1] = 1;
  for (int i = int(2); i <= int(2006); ++i)
    for (int j = 2 * i; j <= 2006; j += i) mu[j] -= mu[i];
  long long a, b, c;
  cin >> a >> b >> c;
  if (a > b) {
    long long t = a;
    a = b;
    b = t;
  }
  long long ans = 0;
  for (int z = int(1); z <= int(c); ++z)
    for (int d = int(1); d <= int(a); ++d) {
      ans += MOD + 1LL * (c / z) * mu[d] % MOD * solve(a, d, z) % MOD *
                       solve(b, d, z) % MOD;
      ans %= MOD;
    }
  cout << ans << endl;
}

### Prompt

Please create a solution in CPP 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 long long MOD = 1 << 30;
const double PI = acos(-1.0);
const double eps = 1e-9;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long gg[2007][2007];
int mu[2007];
inline long long solve(long long a, long long d, long long z) {
  if (gg[d][z] != 1) return 0;
  long long r = 0;
  for (int x = 1, l = a / d; x <= l; ++x)
    if (gg[x][z] == 1) {
      r += a / (x * d);
      if (r >= MOD) r -= MOD;
    }
  return r;
}
int main() {
  for (int i = int(0); i <= int(2006); ++i)
    for (int j = int(i); j <= int(2006); ++j) gg[i][j] = gg[j][i] = gcd(i, j);
  memset(mu, -1, sizeof(mu));
  mu[1] = 1;
  for (int i = int(2); i <= int(2006); ++i)
    for (int j = 2 * i; j <= 2006; j += i) mu[j] -= mu[i];
  long long a, b, c;
  cin >> a >> b >> c;
  if (a > b) {
    long long t = a;
    a = b;
    b = t;
  }
  long long ans = 0;
  for (int z = int(1); z <= int(c); ++z)
    for (int d = int(1); d <= int(a); ++d) {
      ans += MOD + 1LL * (c / z) * mu[d] % MOD * solve(a, d, z) % MOD *
                       solve(b, d, z) % MOD;
      ans %= MOD;
    }
  cout << ans << endl;
}

```