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 maxn = 2e3 + 5;
int pri[maxn], mu[maxn], vis[maxn], mod = 1 << 30;
int GCD[maxn][maxn], ak[3];
void Pri(int n) {
  int u;
  vis[1] = mu[1] = 1;
  for (register int i = 2; i <= n; ++i) {
    if (!vis[i]) pri[++pri[0]] = i, mu[i] = -1;
    for (register int j = 1; j <= pri[0] && i * pri[j] <= n; ++j) {
      u = i * pri[j];
      vis[u] = 1, mu[u] = -mu[i];
      if (i % pri[j] == 0) {
        mu[u] = 0;
        break;
      }
    }
  }
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void PreGCD(int n) {
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j <= n; ++j) GCD[i][j] = gcd(i, j);
}
int F(int n, int m) {
  int ans = 0;
  for (register int i = 1; i <= n; ++i)
    if (GCD[i][m] == 1) ans += (n / i);
  return ans;
}
int GetAns(int a, int b, int c) {
  int ans = 0;
  for (register int i = 1; i <= a; ++i) {
    for (register int j = 1; j <= c; ++j)
      if (GCD[i][j] == 1)
        (ans += mu[i] * (c / j) * F(a / i, j) * F(b / i, j) % mod) %= mod;
  }
  return (ans + mod) % mod;
}
int main() {
  scanf("%d%d%d", &ak[0], &ak[1], &ak[2]);
  sort(ak, ak + 3), PreGCD(ak[2]), Pri(ak[2]);
  printf("%d", GetAns(ak[0], ak[1], ak[2]));
  return 0;
}