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 N = 2005, M = 10755, mod = 1073741824;
int A, B, C, n, cc, mu[N], pr[N], vis[N], d[N], u[M], v[M], w[M], t[N];
long long ans, fa[N], fb[N], fc[N];
vector<pair<int, int> > g[N];
inline int gcd(int a, int b) {
  int c;
  while (b) {
    c = a;
    a = b;
    b = c % b;
  }
  return a;
}
inline long long f(int a, int b, int c) { return fa[a] * fb[b] * fc[c]; }
int main() {
  mu[1] = vis[1] = 1;
  for (register int i = 2; i <= 2000; ++i) {
    if (!vis[i]) pr[++cc] = i, mu[i] = -1;
    for (register int j = 1; j <= cc && i * pr[j] <= 2000; ++j) {
      int t = i * pr[j];
      vis[t] = 1;
      if (i % pr[j] == 0) {
        mu[t] = 0;
        break;
      } else
        mu[t] = -mu[i];
    }
  }
  scanf("%d%d%d", &A, &B, &C);
  n = max(max(A, B), C);
  ans = cc = 0;
  int t1, t2, t3;
  for (register int i = 1; i <= n; ++i)
    d[i] = fa[i] = fb[i] = fc[i] = 0, g[i].clear();
  for (register int i = 1; i <= n; ++i)
    for (int j = i; j <= n; j += i)
      fa[i] += A / j, fb[i] += B / j, fc[i] += C / j;
  for (register int i = 1; i <= n; ++i) ans += mu[i] * fa[i] * fb[i] * fc[i];
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; (t1 = i * j) <= n; ++j)
      if (mu[t1])
        for (register int k = j + 1; (t2 = i * k) <= n && n / t1 >= k; ++k)
          if (mu[t2] && gcd(j, k) == 1) {
            t3 = i * j * k;
            ++d[t1];
            ++d[t2];
            u[++cc] = t1;
            v[cc] = t2;
            w[cc] = t3;
            ans += mu[t2] * (f(t1, t3, t3) + f(t3, t1, t3) + f(t3, t3, t1));
            ans += mu[t1] * (f(t2, t3, t3) + f(t3, t2, t3) + f(t3, t3, t2));
          }
  for (register int i = 1; i <= cc; ++i)
    if (d[u[i]] > d[v[i]])
      g[v[i]].push_back(make_pair(u[i], w[i]));
    else
      g[u[i]].push_back(make_pair(v[i], w[i]));
  for (register int i = 1; i <= n; ++i) {
    int sz1 = g[i].size();
    for (register int j = 0; j < sz1; ++j) t[g[i][j].first] = g[i][j].second;
    for (register int j = 0; j < sz1; ++j) {
      int x = g[i][j].first, sz2 = g[x].size();
      for (register int k = 0, t1 = g[i][j].second, y; k < sz2; ++k)
        if (t[y = g[x][k].first]) {
          int t2 = g[x][k].second, t3 = t[y];
          ans = ans + mu[i] * mu[x] * mu[y] *
                          (f(t1, t2, t3) + f(t1, t3, t2) + f(t2, t1, t3) +
                           f(t2, t3, t1) + f(t3, t1, t2) + f(t3, t2, t1));
        }
    }
    for (register int j = 0; j < sz1; ++j) t[g[i][j].first] = 0;
  }
  ans = (ans % mod + mod) % mod;
  printf("%lld\n", ans);
  return 0;
}