#include <bits/stdc++.h>
struct IO_Tp {
  bool is_digit(const char& ch) { return '0' <= ch && ch <= '9'; }
  IO_Tp& operator>>(int& res) {
    static char ch;
    while (ch = getchar(), !is_digit(ch))
      ;
    res = ch & 15;
    while (ch = getchar(), is_digit(ch)) (res *= 10) += ch & 15;
    return *this;
  }
} IO;
const int Max_N(200005);
int _GCD[5005][5005];
int gcd(const int x1, const int x2) {
  if (x1 <= 5000 && x2 <= 5000) return _GCD[x1][x2];
  return x2 ? gcd(x2, x1 % x2) : x1;
}
int mu[Max_N], F[Max_N];
int N, A, B, C;
unsigned int Ans;
std::vector<std::pair<int, int>> vec[Max_N];
int main(int argc, char** argv) {
  IO >> A >> B >> C;
  N = std::max(A, std::max(B, C));
  for (int i(0); i <= 2000; ++i) {
    _GCD[i][0] = _GCD[0][i] = i;
    for (int j(1); j <= i; ++j) _GCD[i][j] = _GCD[j][i] = _GCD[j][i - j];
  }
  mu[1] = 1;
  for (int i(1); i <= N; ++i) {
    F[i] = F[i - 1] + F[i] + 1;
    for (int j(i * 2); j <= N; j += i) mu[j] -= mu[i], ++F[j];
  }
  for (int i(1); i <= N; ++i)
    if (mu[i])
      for (int j(1); i * j <= N; ++j)
        if (mu[i * j])
          for (int k(1); i * j * k <= N; ++k)
            if (j != k && mu[i * k] && gcd(j, k) == 1)
              vec[i * j].emplace_back(i * k, i * j * k);
  for (int u(1); u <= N; ++u) {
    for (const auto p1 : vec[u]) {
      const int& v(p1.first);
      if (vec[u].size() < vec[v].size() ||
          (vec[u].size() == vec[v].size() && u < v))
        for (const auto p2 : vec[u]) {
          const int& w(p2.first);
          int x;
          if (v != w && (x = v * w / gcd(v, w)) <= N)
            Ans += mu[u] * mu[v] * mu[w] * F[A / p1.second] *
                   (F[B / p2.second] * F[C / x] + F[B / x] * F[C / p2.second]);
        }
      Ans += mu[u] * mu[u] * mu[v] *
             (F[A / u] * F[B / p1.second] * F[C / p1.second] +
              F[A / p1.second] * F[B / u] * F[C / p1.second] +
              F[A / p1.second] * F[B / p1.second] * F[C / u]);
    }
    Ans += mu[u] * mu[u] * mu[u] * F[A / u] * F[B / u] * F[C / u];
  }
  printf("%u", Ans & ((1 << 30) - 1));
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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>
struct IO_Tp {
  bool is_digit(const char& ch) { return '0' <= ch && ch <= '9'; }
  IO_Tp& operator>>(int& res) {
    static char ch;
    while (ch = getchar(), !is_digit(ch))
      ;
    res = ch & 15;
    while (ch = getchar(), is_digit(ch)) (res *= 10) += ch & 15;
    return *this;
  }
} IO;
const int Max_N(200005);
int _GCD[5005][5005];
int gcd(const int x1, const int x2) {
  if (x1 <= 5000 && x2 <= 5000) return _GCD[x1][x2];
  return x2 ? gcd(x2, x1 % x2) : x1;
}
int mu[Max_N], F[Max_N];
int N, A, B, C;
unsigned int Ans;
std::vector<std::pair<int, int>> vec[Max_N];
int main(int argc, char** argv) {
  IO >> A >> B >> C;
  N = std::max(A, std::max(B, C));
  for (int i(0); i <= 2000; ++i) {
    _GCD[i][0] = _GCD[0][i] = i;
    for (int j(1); j <= i; ++j) _GCD[i][j] = _GCD[j][i] = _GCD[j][i - j];
  }
  mu[1] = 1;
  for (int i(1); i <= N; ++i) {
    F[i] = F[i - 1] + F[i] + 1;
    for (int j(i * 2); j <= N; j += i) mu[j] -= mu[i], ++F[j];
  }
  for (int i(1); i <= N; ++i)
    if (mu[i])
      for (int j(1); i * j <= N; ++j)
        if (mu[i * j])
          for (int k(1); i * j * k <= N; ++k)
            if (j != k && mu[i * k] && gcd(j, k) == 1)
              vec[i * j].emplace_back(i * k, i * j * k);
  for (int u(1); u <= N; ++u) {
    for (const auto p1 : vec[u]) {
      const int& v(p1.first);
      if (vec[u].size() < vec[v].size() ||
          (vec[u].size() == vec[v].size() && u < v))
        for (const auto p2 : vec[u]) {
          const int& w(p2.first);
          int x;
          if (v != w && (x = v * w / gcd(v, w)) <= N)
            Ans += mu[u] * mu[v] * mu[w] * F[A / p1.second] *
                   (F[B / p2.second] * F[C / x] + F[B / x] * F[C / p2.second]);
        }
      Ans += mu[u] * mu[u] * mu[v] *
             (F[A / u] * F[B / p1.second] * F[C / p1.second] +
              F[A / p1.second] * F[B / u] * F[C / p1.second] +
              F[A / p1.second] * F[B / p1.second] * F[C / u]);
    }
    Ans += mu[u] * mu[u] * mu[u] * F[A / u] * F[B / u] * F[C / u];
  }
  printf("%u", Ans & ((1 << 30) - 1));
  return 0;
}

```