#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const long long INF = ~0LLU >> 1;
int rd() { return RAND_MAX == 32767 ? ((rand() << 15) ^ rand()) : rand(); }
int s[3010];
vector<int> pri;
map<int, long long> M[310];
bool IsPrime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
long long Hash(int a, int b, int c) {
  return s[a - 1] + (4003 - a - b) * (b - a) / 2 + c - b;
}
long long Calc(int a, int b, int c, int dep) {
  if (dep == pri.size()) return 1;
  if (a > b) swap(a, b);
  if (b > c) swap(b, c);
  if (a > b) swap(a, b);
  int has = Hash(a, b, c);
  if (M[dep].count(has)) return M[dep][has];
  int p = pri[dep];
  long long res = 0;
  for (int i = 0, x = a; x; x /= p, i++)
    for (int j = 0, y = b; y; y /= p, j++)
      for (int k = 0, z = c; z; z /= p, k++)
        res += Calc(x, y, z, dep + 1) * (i + j + k + 1);
  return (M[dep][has] = res);
}
int main() {
  s[0] = 0;
  for (int i = 1; i <= 2000; i++) s[i] = s[i - 1] + (2002 - i) * (2001 - i) / 2;
  int a, b, c;
  cin >> a >> b >> c;
  for (int i = 2; i <= max(max(a, b), c); i++)
    if (IsPrime(i)) pri.push_back(i);
  reverse(pri.begin(), pri.end());
  cout << Calc(a, b, c, 0) % (1 << 30) << endl;
  return 0;
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const long long INF = ~0LLU >> 1;
int rd() { return RAND_MAX == 32767 ? ((rand() << 15) ^ rand()) : rand(); }
int s[3010];
vector<int> pri;
map<int, long long> M[310];
bool IsPrime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
long long Hash(int a, int b, int c) {
  return s[a - 1] + (4003 - a - b) * (b - a) / 2 + c - b;
}
long long Calc(int a, int b, int c, int dep) {
  if (dep == pri.size()) return 1;
  if (a > b) swap(a, b);
  if (b > c) swap(b, c);
  if (a > b) swap(a, b);
  int has = Hash(a, b, c);
  if (M[dep].count(has)) return M[dep][has];
  int p = pri[dep];
  long long res = 0;
  for (int i = 0, x = a; x; x /= p, i++)
    for (int j = 0, y = b; y; y /= p, j++)
      for (int k = 0, z = c; z; z /= p, k++)
        res += Calc(x, y, z, dep + 1) * (i + j + k + 1);
  return (M[dep][has] = res);
}
int main() {
  s[0] = 0;
  for (int i = 1; i <= 2000; i++) s[i] = s[i - 1] + (2002 - i) * (2001 - i) / 2;
  int a, b, c;
  cin >> a >> b >> c;
  for (int i = 2; i <= max(max(a, b), c); i++)
    if (IsPrime(i)) pri.push_back(i);
  reverse(pri.begin(), pri.end());
  cout << Calc(a, b, c, 0) % (1 << 30) << endl;
  return 0;
}

```