#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
int isprime[2010], mu[2010], gcd[2010][2010];
int get_gcd(int x, int y) {
  if (y == 0) return x;
  return get_gcd(y, x % y);
}
void prepare() {
  mu[1] = 1;
  for (int i = 2; i <= 2000; i++) {
    if (isprime[i] == 0) {
      primes.push_back(i);
      mu[i] = -1;
    }
    for (int j = 0; j < primes.size() && i * primes[j] <= 2000; j++) {
      isprime[i * primes[j]] = 1;
      if (i % primes[j] == 0) break;
      mu[i * primes[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++) gcd[i][j] = get_gcd(max(i, j), min(i, j));
}
int query(int x, int y) {
  int res = 0;
  for (int i = 1; i <= x; i++) {
    if (gcd[i][y] == 1) res += x / i;
  }
  return res;
}
int a, b, c, ans;
int main() {
  prepare();
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= a; i++)
    for (int j = 1; j <= min(b, c); j++)
      if (gcd[i][j] == 1) {
        ans += (a / i) * mu[j] * query(c / j, i) * query(b / j, i);
      }
  ans = ans & 0x7FFFFFFF;
  printf("%d", ans % 1073741824);
}

### Prompt

Your task is to create 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;
vector<int> primes;
int isprime[2010], mu[2010], gcd[2010][2010];
int get_gcd(int x, int y) {
  if (y == 0) return x;
  return get_gcd(y, x % y);
}
void prepare() {
  mu[1] = 1;
  for (int i = 2; i <= 2000; i++) {
    if (isprime[i] == 0) {
      primes.push_back(i);
      mu[i] = -1;
    }
    for (int j = 0; j < primes.size() && i * primes[j] <= 2000; j++) {
      isprime[i * primes[j]] = 1;
      if (i % primes[j] == 0) break;
      mu[i * primes[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++) gcd[i][j] = get_gcd(max(i, j), min(i, j));
}
int query(int x, int y) {
  int res = 0;
  for (int i = 1; i <= x; i++) {
    if (gcd[i][y] == 1) res += x / i;
  }
  return res;
}
int a, b, c, ans;
int main() {
  prepare();
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= a; i++)
    for (int j = 1; j <= min(b, c); j++)
      if (gcd[i][j] == 1) {
        ans += (a / i) * mu[j] * query(c / j, i) * query(b / j, i);
      }
  ans = ans & 0x7FFFFFFF;
  printf("%d", ans % 1073741824);
}

```