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;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') ch == '-' && (f = 0) || (ch = getchar());
  while (ch <= '9' && ch >= '0')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return f ? x : -x;
}
const int mod = 1073741824;
int pri[2020], cnt, mark[2020], mu[2020];
void prepare(int n) {
  mu[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!mark[i]) pri[++cnt] = i, mu[i] = -1;
    for (int j = 1; j <= cnt && i * pri[j] <= n; j++) {
      mark[i * pri[j]] = 1;
      if (i % pri[j] == 0) {
        mu[i * pri[j]] = 0;
        break;
      } else {
        mu[i * pri[j]] = -mu[i];
      }
    }
  }
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int g[2020][2020];
int main(int argc, char const *argv[]) {
  long long a = read(), b = read(), c = read();
  if (a > b) swap(a, b);
  long long mx = max(max(a, b), c);
  prepare(a);
  for (int i = 1; i <= mx; ++i)
    for (int j = 1; j <= mx; ++j) g[i][j] = gcd(i, j);
  long long ans = 0;
  for (int i = 1; i <= c; ++i) {
    for (int d = 1; d <= a; ++d) {
      if (g[i][d] == 1) {
        long long a1 = 0, a2 = 0;
        for (int j = 1; j <= a / d; ++j)
          if (g[i][j] == 1) a1 += a / d / j;
        for (int j = 1; j <= b / d; ++j)
          if (g[i][j] == 1) a2 += b / d / j;
        ans += a1 * a2 % mod * mu[d] * (c / i) % mod;
      }
    }
  }
  cout << (ans % mod + mod) % mod << endl;
  return 0;
}