#include <bits/stdc++.h>
using namespace std;
const int N = 2000;
const long long Mod = 1073741824;
long long n, m, K, size;
int f[2005][2005];
long long mu[2005], prime[2005];
int notprime[2005];
void Init() {
  mu[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (!notprime[i]) {
      prime[++size] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= size; j++) {
      int k = prime[j] * i;
      if (k > N) break;
      notprime[k] = 1;
      if (i % prime[j] == 0) {
        mu[k] = 0;
        break;
      } else
        mu[k] = -mu[i];
    }
  }
  for (int i = 1; i <= N; i++) {
    f[i][0] = i;
    for (int j = 1; j <= i; j++) f[i][j] = f[j][i % j];
    for (int j = i + 1; j <= N; j++) f[i][j] = f[i][j % i];
  }
}
long long calc(long long n, long long k, long long d) {
  long long ans = 0;
  for (long long i = 1; i <= n; i++)
    if (f[i * d][k] == 1) ans = (ans + n / i) % Mod;
  return ans;
}
int main() {
  scanf("%lld%lld%lld", &n, &m, &K);
  Init();
  long long ans = 0;
  for (long long t = 1; t <= K; t++)
    for (long long d = 1; d <= n; d++)
      if (mu[d])
        ans = (ans + K / t * mu[d] * calc(n / d, t, d) % Mod *
                         calc(m / d, t, d) % Mod) %
              Mod;
  ans = (ans % Mod + Mod) % Mod;
  printf("%lld\n", ans);
  return 0;
}

### Prompt

Generate 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 N = 2000;
const long long Mod = 1073741824;
long long n, m, K, size;
int f[2005][2005];
long long mu[2005], prime[2005];
int notprime[2005];
void Init() {
  mu[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (!notprime[i]) {
      prime[++size] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= size; j++) {
      int k = prime[j] * i;
      if (k > N) break;
      notprime[k] = 1;
      if (i % prime[j] == 0) {
        mu[k] = 0;
        break;
      } else
        mu[k] = -mu[i];
    }
  }
  for (int i = 1; i <= N; i++) {
    f[i][0] = i;
    for (int j = 1; j <= i; j++) f[i][j] = f[j][i % j];
    for (int j = i + 1; j <= N; j++) f[i][j] = f[i][j % i];
  }
}
long long calc(long long n, long long k, long long d) {
  long long ans = 0;
  for (long long i = 1; i <= n; i++)
    if (f[i * d][k] == 1) ans = (ans + n / i) % Mod;
  return ans;
}
int main() {
  scanf("%lld%lld%lld", &n, &m, &K);
  Init();
  long long ans = 0;
  for (long long t = 1; t <= K; t++)
    for (long long d = 1; d <= n; d++)
      if (mu[d])
        ans = (ans + K / t * mu[d] * calc(n / d, t, d) % Mod *
                         calc(m / d, t, d) % Mod) %
              Mod;
  ans = (ans % Mod + Mod) % Mod;
  printf("%lld\n", ans);
  return 0;
}

```