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;
struct Node {
  int x1, x2, x3, whe;
};
const unsigned int mode = ((unsigned int)1 << 30) - 1;
int a, b, c, p[100100], top, n, where[100100];
map<Node, unsigned int> F;
map<Node, bool> Vis;
bool vis[100100];
void shai() {
  n = max(max(a, b), c);
  vis[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      p[++top] = i;
      for (int j = i * i; j <= n; j += i) vis[j] = 1;
    }
    where[i] = top;
  }
}
bool operator<(Node x, Node y) {
  if (x.x1 > y.x1) return true;
  if (x.x1 == y.x1 && x.x2 > y.x2) return true;
  if (x.x1 == y.x1 && x.x2 == y.x2 && x.x3 > y.x3) return true;
  if (x.x1 == y.x1 && x.x2 == y.x2 && x.x3 == y.x3 && x.whe > y.whe)
    return true;
  return false;
}
unsigned int equal2(int sum1, int sum2) {
  unsigned int s = (2 * sum1) * (2 * sum2);
  s -= min(sum1, sum2) * 4;
  s += min(sum1, sum2) * 3;
  if (s >= mode) s &= mode;
  return s;
}
unsigned int delate(int sum1, int sum2, int sum3) {
  int v = sum3 - min(sum1, sum2);
  sum3 = min(sum3, min(sum1, sum2));
  unsigned int s = min(sum1, sum2) * 8 * (sum3 - 1);
  if (v > 0) s += min(sum1, sum2) * 8 * v;
  if (v < 0) s += abs(v) * 8;
  s -= min(sum1, sum2) * 6 * (sum3 - 1);
  if (v > 0) s -= min(sum1, sum2) * 6 * v;
  if (v < 0) s -= abs(v) * 6;
  return s;
}
unsigned int equal3(int sum1, int sum2, int sum3) {
  unsigned int s = sum1 * sum2 * sum3 * 8;
  if (sum1 == 0 || sum2 == 0 || sum3 == 0) return 0;
  s -= delate(sum1, sum2, sum3);
  s -= delate(sum1, sum3, sum2);
  s -= delate(sum3, sum2, sum1);
  s -= min(sum1, min(sum2, sum3)) * 8;
  s += min(sum1, min(sum2, sum3)) * 4;
  return s;
}
unsigned int calc(int x1, int x2, int x3, int p) {
  int sum1 = where[x1] - where[p] + 1, sum2 = where[x2] - where[p] + 1,
      sum3 = where[x3] - where[p] + 1;
  unsigned int s = 1;
  sum1 = max(sum1, 0);
  sum2 = max(sum2, 0);
  sum3 = max(sum3, 0);
  s += equal2(sum1, sum2);
  s += equal2(sum1, sum3);
  s += equal2(sum2, sum3);
  s += equal3(sum1, sum2, sum3);
  s += max(sum1 * 2, 0);
  s += max(sum2 * 2, 0);
  s += max(sum3 * 2, 0);
  return s;
}
unsigned int dfs(int x1, int x2, int x3, int whe) {
  int s[3] = {x1, x2, x3};
  sort(s, s + 3);
  x1 = s[0];
  x2 = s[1];
  x3 = s[2];
  if (whe > top || p[whe] > x3) return 1;
  if (p[whe] > sqrt(x3)) return calc(x1, x2, x3, p[whe]);
  if (Vis[((Node){x1, x2, x3, whe})]) return F[(Node){x1, x2, x3, whe}];
  unsigned int v = 0;
  Vis[((Node){x1, x2, x3, whe})] = 1;
  for (int i = 0, v1 = x1; v1; i++, v1 /= p[whe])
    for (int j = 0, v2 = x2; v2; j++, v2 /= p[whe])
      for (int k = 0, v3 = x3; v3; k++, v3 /= p[whe]) {
        v += dfs(v1, v2, v3, whe + 1) * (i + j + k + 1);
      }
  F[(Node){x1, x2, x3, whe}] = v;
  return v;
}
int main() {
  cin >> a >> b >> c;
  shai();
  cout << (dfs(a, b, c, 1) & mode);
}