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.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int Mod = 1 << 30, MAXN = 2000;
int t, A, B, C, n, m;
int cnt, vt[MAXN + 5], Deg[MAXN + 5];
struct node {
  int u, v, w;
} E[8 * MAXN + 5];
struct Edge {
  int v, w;
};
vector<Edge> Graph[MAXN + 5];
int k, prime[MAXN + 5], mu[MAXN + 5], f[3][MAXN + 5];
bool vis[MAXN + 5];
void Init() {
  mu[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      prime[++k] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= k && 1ll * i * prime[j] <= MAXN; j++) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
      mu[i * prime[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j += i) {
      f[0][i] = (f[0][i] + A / j) % Mod;
      f[1][i] = (f[1][i] + B / j) % Mod;
      f[2][i] = (f[2][i] + C / j) % Mod;
    }
  }
}
int chk(long long x) { return (x % Mod + Mod) % Mod; }
int Calc(int u, int v, int w) {
  return chk(1ll * f[0][u] * f[1][v] % Mod * f[2][w] % Mod);
}
int Gcd(int a, int b) { return !b ? a : Gcd(b, a % b); }
int Solve() {
  int Ans = 0;
  for (int i = 1; i <= m; i++)
    Ans = (Ans + chk(mu[i] * mu[i] * mu[i] * Calc(i, i, i))) % Mod;
  for (int d = 1; d <= n; d++)
    for (int i = 1; i <= n / d; i++)
      for (int j = i + 1; j <= n / i / d; j++) {
        int u = i * d, v = j * d, l = i * j * d;
        if (Gcd(i, j) != 1 || !mu[u] || !mu[v]) continue;
        Ans = (Ans +
               chk(mu[u] * mu[u] * mu[v] *
                   chk(1ll * Calc(u, l, l) + Calc(l, u, l) + Calc(l, l, u)))) %
              Mod;
        Ans = (Ans +
               chk(mu[u] * mu[v] * mu[v] *
                   chk(1ll * Calc(v, l, l) + Calc(l, v, l) + Calc(l, l, v)))) %
              Mod;
        E[++cnt] = {u, v, l};
      }
  for (int i = cnt, u, v, w; i >= 1; i--) {
    u = E[i].u, v = E[i].v, w = E[i].w;
    if (Deg[u] < Deg[v] || (Deg[u] == Deg[v] && u < v))
      Graph[u].push_back({v, w});
    else
      Graph[v].push_back({u, w});
  }
  for (int u = 0; u <= n; u++) {
    if (!mu[u]) continue;
    for (int i = 0; i < Graph[u].size(); i++) vt[Graph[u][i].v] = Graph[u][i].w;
    for (int i = 0; i < Graph[u].size(); i++) {
      int v = Graph[u][i].v, uw = Graph[u][i].w;
      if (!mu[v]) continue;
      for (int j = 0; j < Graph[v].size(); j++) {
        int w = Graph[v][j].v, vw = Graph[v][j].w;
        if (!mu[w]) continue;
        if (vt[w]) {
          int ww = vt[w];
          Ans = (Ans + chk(mu[u] * mu[v] * mu[w] *
                           chk(1ll * Calc(uw, vw, ww) + Calc(uw, ww, vw) +
                               Calc(vw, uw, ww) + Calc(vw, ww, uw) +
                               Calc(ww, uw, vw) + Calc(ww, vw, uw)))) %
                Mod;
        }
      }
    }
    for (int i = 0; i < Graph[u].size(); i++) vt[Graph[u][i].v] = 0;
  }
  return Ans;
}
int main() {
  scanf("%d %d %d", &A, &B, &C);
  n = max(A, max(B, C));
  m = min(A, min(B, C));
  Init();
  printf("%d\n", Solve());
  return 0;
}