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;
int n, m, K;
int mo[2005];
int vis[2005];
int Pri[2005];
int mark[2005][2005];
int GCD(int a, int b) {
  if (mark[a][b]) return mark[a][b];
  if (!b) return a;
  int t = GCD(b, a % b);
  return mark[a][b] = mark[b][a] = t;
}
void Init() {
  int top = 0;
  mo[1] = 1;
  for (int i = (2), i_end_ = (2005 - 5); i <= i_end_; i++) {
    if (!vis[i]) {
      Pri[++top] = i;
      mo[i] = -1;
    }
    for (int j = 1; j <= top && Pri[j] * i <= 2005 - 5; j++) {
      int t = Pri[j] * i;
      vis[t] = 1;
      if (i % Pri[j])
        mo[t] = -mo[i];
      else {
        mo[t] = 0;
        break;
      }
    }
  }
}
int main() {
  Init();
  scanf("%d%d%d", &n, &m, &K);
  long long ans = 0;
  for (int k = (1), k_end_ = (K); k <= k_end_; k++) {
    long long tot = 0;
    for (int d = (1), d_end_ = (min(n, m)); d <= d_end_; d++) {
      if (!mo[d]) continue;
      long long res1 = 0, res2 = 0;
      for (int i = (1), i_end_ = (n / d); i <= i_end_; i++) {
        res1 = res1 + (n / d / i) * (GCD(d * i, k) == 1);
        res1 %= 1073741824;
      }
      for (int j = (1), j_end_ = (m / d); j <= j_end_; j++) {
        res2 = res2 + (m / d / j) * (GCD(d * j, k) == 1);
        res2 %= 1073741824;
      }
      tot = (tot + res1 * res2 * mo[d]) % 1073741824;
    }
    ans = (ans + tot * (K / k)) % 1073741824;
  }
  printf("%lld\n", ans);
  return 0;
}