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:

$\sum_{i = 1}^{a} \sum_{j = 1}^{b} \sum_{k = 1}^{c} d(i \cdot j \cdot k)$

Find the sum modulo 1073741824 (2^30).


-----Input-----

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 100).


-----Output-----

Print a single integer — the required sum modulo 1073741824 (2^30).


-----Examples-----
Input
2 2 2

Output
20

Input
5 6 7

Output
1520



-----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.

Difficulty: EASY

Solutions:
(a, b, c) = map(int, input().split())
uniquenums = {}
ret = 0

def dfunc(n):
	score = 0
	for i in range(1, int(n ** (1 / 2)) + 1):
		if n % i == 0:
			score += 1
	score *= 2
	if n ** (1 / 2) == int(n ** (1 / 2)):
		score -= 1
	return score
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			mult = i * j * k
			if mult not in uniquenums:
				uniquenums[mult] = dfunc(mult)
			ret += uniquenums[mult]
print(ret % 1073741824)


(a, b, c) = map(int, input().split())
d = [0] * 1000010
for i in range(1, a * b * c + 1):
	for j in range(i, a * b * c + 1, i):
		d[j] += 1
sum_n = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			sum_n = sum_n + d[i * j * k]
print(sum_n % 1073741824)


MOD = 1073741824
(a, b, c) = map(int, input().split(' '))
maxProd = a * b * c
d = [0 for i in range(maxProd + 1)]
d[1] = 1
for i in range(2, maxProd + 1):
	d[i] = 2
for i in range(2, maxProd // 2 + 1):
	for j in range(2 * i, maxProd + 1, i):
		d[j] += 1
ret = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ret = (ret + d[i * j * k]) % MOD
print(ret)


(a, b, c) = map(int, input().split())
d = 1073741824
p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
t = [{} for i in range(101)]
ans = {}
for i in p:
	j = i
	m = 1
	while j < 101:
		for k in range(j, 101, j):
			t[k][i] = m
		j = j * i
		m += 1
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		q = {}
		for x in t[i].keys() | t[j].keys():
			q[x] = t[i].get(x, 0) + t[j].get(x, 0)
		ij = i * j
		for k in range(1, c + 1):
			ijk = ij * k
			if ijk in ans:
				s += ans[ijk]
			else:
				y = 1
				for x in q.keys() | t[k].keys():
					y = y * (q.get(x, 0) + t[k].get(x, 0) + 1)
				ans[ijk] = y
				s += y
print(s)


def divi(a):
	c = 0
	x = int(a ** 0.5)
	for i in range(1, x + 1):
		if a % i == 0 and a / i == i:
			c += 1
		elif a % i == 0 and a / i != i:
			c += 2
	return c
s = 0
d = {}
(a, b, c) = map(int, input().split())
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			t = i * j * k
			if t not in d:
				d[t] = divi(t)
			s += d[t]
print(s % 2 ** 30)


s = 0
(a, b, c) = map(int, input().split())
l = [0] * (a * b * c + 1)
for i in range(1, a * b * c + 1):
	for j in range(i, a * b * c + 1, i):
		l[j] += 1
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += l[i * j * k]
print(s % 2 ** 30)


p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]

def divs(n):
	res = 1
	pos = 0
	while n > 1:
		while pos < len(p) and n % p[pos] != 0:
			pos += 1
		if n > 1 and pos >= len(p):
			res *= 2
			break
		cnt = 0
		while n % p[pos] == 0:
			cnt += 1
			n //= p[pos]
		res *= cnt + 1
		pos += 1
	return res
d = {}
(a, b, c) = map(int, input().split())
res = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			val = i * j * k
			if val not in d:
				d[val] = divs(val)
			res = (res + d[val]) % 1073741824
print(res)


from math import sqrt, ceil
(a, b, c) = map(int, input().split())
cache = {}

def s(n):
	if n in cache:
		return cache[n]
	if n == 1:
		return 1
	sn = sqrt(n)
	r = 0
	for i in range(1, int(sn) + 1):
		if n % i == 0:
			r += 1
			if i * i < n:
				r += 1
	cache[n] = r
	return r
su = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			rr = s(i * j * k)
			su += rr
			su %= 1073741824
print(su)


def dic(n):
	i = 2
	f = 1
	t = 0
	while i * i <= n:
		while n % i == 0:
			t += 1
			n //= i
		f = f * (t + 1)
		t = 0
		if i == 2:
			i = 3
		else:
			i += 2
	if n > 1:
		f *= 2
	return f
(a, b, c) = map(int, input().split())
d = dict()
a += 1
b += 1
c += 1
g = 0
for i in range(1, a):
	for j in range(1, b):
		for z in range(1, c):
			ans = dic(i * j * z)
			g += ans
print(g)


import math
import itertools
import operator
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

def get_prime_mult(n):
	m = [0] * 25
	if n < 2:
		return m
	sq = int(math.sqrt(n))
	p = 0
	while primes[p] <= sq:
		if n % primes[p] != 0:
			p += 1
		else:
			m[p] += 1
			n //= primes[p]
			sq = int(math.sqrt(n))
	m[primes.index(n)] += 1
	return m
(a, b, c) = map(int, input().split())
mtab = []
for i in range(max((a, b, c)) + 1):
	mtab.append(get_prime_mult(i))
total = 0
mults_cnt = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if i * j * k not in mults_cnt:
				mults = [sum(triple) + 1 for triple in zip(mtab[i], mtab[j], mtab[k])]
				mults_cnt[i * j * k] = list(itertools.accumulate(mults, operator.mul))[-1]
			total += mults_cnt[i * j * k]
print(total & 1073741823)


p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

def dp(n):
	ans = 1
	y = 0
	for i in p:
		if n < i:
			break
		y = 1
		while n % i == 0 and n >= i:
			n /= i
			y += 1
		ans *= y
	return ans
(a, b, c) = list(map(int, input().split()))
x = dict()
total = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			e = i * j * k
			if e not in x:
				x[e] = dp(e)
			total += x[e]
print(total)


import sys
import math
import itertools
import collections

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber
(a, b, c) = mi()
ans = 0
d = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			item = i * j * k
			if item not in d:
				d[item] = len(divs(i * j * k))
				ans += d[item]
			else:
				ans += d[item]
print(ans)


(a, b, c) = map(int, input().split())
M = 1073741824
n = a * b * c
d = [1] * (n + 1)
for i in range(2, n + 1):
	for j in range(i, n + 1, i):
		d[j] += 1
r = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			r += d[i * j * k] % M
print(r % M)


(a, b, c) = map(int, input().split())
n = a * b * c + 1
div = [1] * n
for i in range(2, n):
	for j in range(i, n, i):
		div[j] += 1
ans = 0
m = 1073741824
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ans += div[i * j * k] % m
print(ans)


mod = 1 << 30
d = {}

def div(x):
	if x in d:
		return d[x]
	(res, p, q) = (1, 2, x)
	while p * p <= x:
		r = 1
		while x % p == 0:
			x /= p
			r += 1
		res = res * r % mod
		p += 1
	if x > 1:
		res = res * 2 % mod
	d[q] = res
	return res
(a, b, c) = sorted(map(int, input().split()))
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += div(i * j * k)
print(s)


import math
res = 0
(a, b, c) = map(int, input().split())
arr = [0] * 1000001
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			num = i * j * k
			count = 0
			if arr[num]:
				res += arr[num]
			else:
				for l in range(1, math.floor(num ** (1 / 2)) + 1):
					if num % l == 0:
						if num // l != l:
							count += 2
						else:
							count += 1
				res += count
				arr[num] = count
print(res % 2 ** 30)


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : list(map(int, input().split()))
I = lambda : int(input())
(a, b, c) = M()
MAX = a * b * c + 1
factor = [0] * (MAX + 1)

def generatePrimeFactors():
	factor[1] = 1
	for i in range(2, MAX):
		factor[i] = i
	for i in range(4, MAX, 2):
		factor[i] = 2
	i = 3
	while i * i < MAX:
		if factor[i] == i:
			j = i * i
			while j < MAX:
				if factor[j] == j:
					factor[j] = i
				j += i
		i += 1

def calculateNoOFactors(n):
	if n == 1:
		return 1
	ans = 1
	dup = factor[n]
	c = 1
	j = int(n / factor[n])
	while j > 1:
		if factor[j] == dup:
			c += 1
		else:
			dup = factor[j]
			ans = ans * (c + 1)
			c = 1
		j = int(j / factor[j])
	ans = ans * (c + 1)
	return ans
d = [0] * (a * b * c + 1)
generatePrimeFactors()
x = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if d[i * j * k] == 0:
				d[i * j * k] = calculateNoOFactors(i * j * k)
			x += d[i * j * k] % 1073741824
print(x % 1073741824)


(a, b, c) = map(int, input().split())
p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
mod = 1073741824

def divisor(x):
	y = 0
	ans = 1
	for i in p:
		if x < i:
			break
		y = 1
		while x % i == 0 and x >= i:
			x /= i
			y += 1
		ans *= y
	return ans
sm = 0
dict = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if i * j * k not in dict.keys():
				dict[i * j * k] = divisor(i * j * k)
			sm = sm + dict[i * j * k]
print(sm % mod)


primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151]
mmm = 1073741824
import math
(a, b, c) = list(map(int, input().split()))
arr = []
count = 0

def d(x):
	ans = 1
	for i in primes:
		if x < i:
			break
		power = 0
		while x % i == 0 and x >= i:
			x = x // i
			power += 1
		ans *= power + 1
	return ans
for smh1 in range(1, a + 1):
	for smh2 in range(1, b + 1):
		for smh3 in range(1, c + 1):
			xxx = d(smh1 * smh2 * smh3)
			count += xxx
print(count % mmm % mmm)


primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

def fun(x):
	cnt = 0
	ans = 1
	for i in primes:
		if x < i:
			break
		cnt = 1
		while x % i == 0 and x >= i:
			x = x // i
			cnt += 1
		ans *= cnt
	return ans
(a, b, c) = map(int, input().split())
res = 0
dic = dict()
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if i * j * k not in dic.keys():
				dic[i * j * k] = fun(i * j * k)
			res += dic[i * j * k]
print(res % 1073741824)


import sys, math, itertools, random, bisect
from collections import defaultdict
INF = sys.maxsize

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 10 ** 9 + 7
mp = {}

def d(x):
	if x in mp:
		return mp[x]
	ans = 0
	r = 1
	while r * r <= x:
		if x % r == 0:
			if x == r * r:
				ans += 1
			else:
				ans += 2
		r += 1
	mp[x] = ans
	return ans
for _ in range(1):
	(a, b, c) = get_ints()
	ans = 0
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				x = i * j * k
				ans += d(x)
	print(ans)


import math
from functools import reduce

def get_factors_count(nb: int) -> int:
	counts = {2: 0}
	while nb % 2 == 0:
		counts[2] += 1
		nb //= 2
	iter_range = range(3, int(math.sqrt(nb)) + 1, 2)
	counts = {**counts, **dict.fromkeys(iter_range, 0)}
	for i in iter_range:
		while nb % i == 0:
			counts[i] += 1
			nb //= i
	if nb > 2:
		counts[nb] = 1
	return reduce(lambda a, b: a * (b + 1), counts.values(), 1)
result = 0
calculated = dict()
(a, b, c) = map(int, input().split())
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			product = i * j * k
			if product not in calculated.keys():
				calculated[product] = get_factors_count(i * j * k)
			result += calculated[product]
print(result % 2 ** 30)


(a, b, c) = map(int, input().split())
limit = a * b * c + 1
d = [1] * limit
for i in range(2, limit):
	for j in range(i, limit, i):
		d[j] += 1
answer = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			answer += d[i * j * k]
print(answer % 1073741824)


(a, b, c) = map(int, input().split())
li = a * b * c + 1
d = [1] * li
for i in range(2, li):
	for j in range(i, li, i):
		d[j] += 1
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ans += d[i * j * k]
print(ans)


import sys
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
dp = {}
for i in range(len(primes)):
	dp[primes[i]] = 2

def factors(n):
	if n in dp:
		return dp[n]
	k = n
	s = 1
	for i in range(len(primes)):
		if n % primes[i] == 0:
			c = 0
			while n % primes[i] == 0 and n >= primes[i]:
				c += 1
				n = n // primes[i]
			s *= c + 1
	dp[k] = s
	return s
(a, b, c) = map(int, sys.stdin.readline().split())
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += factors(i * j * k)
print(s % 1073741824)


(a, b, c) = [int(x) for x in input().split(' ')]
mod = 1073741824

def divisors(x):
	powers = {}
	i = 2
	while x != 1:
		if x % i == 0:
			if i in powers:
				powers[i] += 1
			else:
				powers[i] = 1
			x //= i
		else:
			i += 1
	return powers
primeFactors = {}
for x in range(1, 101):
	primeFactors[x] = divisors(x)

def finalMapPrepare(finalMap, x):
	for k in primeFactors[x]:
		if k in finalMap:
			finalMap[k] += primeFactors[x][k]
		else:
			finalMap[k] = primeFactors[x][k]
total = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			finalMap = {}
			finalMapPrepare(finalMap, i)
			finalMapPrepare(finalMap, j)
			finalMapPrepare(finalMap, k)
			ans = 1
			for v in finalMap.values():
				ans *= v + 1
			total += ans % mod
print(total % mod)


def sol(x):
	if d[x] != 0:
		return d[x]
	z = 1
	(res, p, q) = (0, 1, x)
	while p * p <= x:
		if x % z == 0:
			res += 1
			if z * z != x:
				res += 1
		p += 1
		z += 1
	d[x] = res
	return res
(a, b, c) = map(int, input().split())
d = [0] * 10000001
ans = 0
MOD = 1073741824
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ans += sol(i * j * k)
print(ans % MOD)


lis = list(map(int, input().split()))
sumall = 0
dic = {}
modulo = 1073741824

def number_of_divisors(a):
	if a in dic:
		return dic[a]
	(res, i, t) = (1, 2, a)
	while i * i <= a:
		r = 1
		while a % i == 0:
			a /= i
			r += 1
		res = res * r % modulo
		i += 1
	if a > 1:
		res = res * 2 % modulo
	dic[t] = res
	return res
for i in range(1, lis[0] + 1):
	for j in range(1, lis[1] + 1):
		for k in range(1, lis[2] + 1):
			s = (i, j, k)
			sumall += number_of_divisors(i * j * k)
print(sumall % modulo)


(a, b, c) = map(int, input().split())
m = [2] * (a * b * c + 1)
m[1] = 1
for i in range(2, len(m)):
	for j in range(2 * i, len(m), i):
		m[j] += 1
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for l in range(1, c + 1):
			ans = (ans + m[i * j * l]) % 1073741824
print(ans)


mod = 1 << 30
memo = dict()

def dp(x):
	if x in memo:
		return memo[x]
	(res, q, t) = (1, 2, x)
	while q * q <= x:
		r = 1
		while x % q == 0:
			x /= q
			r += 1
		res = res * r % mod
		q += 1
	if x > 1:
		res = res * 2 % mod
	memo[t] = res
	return res
(a, b, c) = sorted(map(int, input().split()))
res = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			res = (res + dp(i * j * k)) % mod
print(res)


from operator import mul
from functools import reduce
from collections import Counter
(a, b, c) = map(int, input().split())
mod = 2 ** 30
prime = [None] * 100
for i in range(2, 101):
	if prime[i - 1] is None:
		for j in range(i, 101, i):
			prime[j - 1] = i
d = {}
result = 0
for ai in range(1, a + 1):
	for bi in range(1, b + 1):
		for ci in range(1, c + 1):
			n = ai * bi * ci
			res = d.get(n)
			if res is None:
				cd = Counter()
				n_ai = ai
				while prime[n_ai - 1] is not None:
					cd[prime[n_ai - 1]] += 1
					n_ai //= prime[n_ai - 1]
				n_bi = bi
				while prime[n_bi - 1] is not None:
					cd[prime[n_bi - 1]] += 1
					n_bi //= prime[n_bi - 1]
				n_ci = ci
				while prime[n_ci - 1] is not None:
					cd[prime[n_ci - 1]] += 1
					n_ci //= prime[n_ci - 1]
				res = reduce(mul, map(lambda x: x + 1, cd.values()), 1)
				d[n] = res
			result += res
print(result % mod)


import math
(a, b, c) = map(int, input().split())
mod = 1073741824
n = a * b * c
divs = [1] * (n + 1)
for i in range(2, n + 1):
	for j in range(i, n + 1, i):
		divs[j] += 1
count = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			count += divs[i * j * k] % mod
print(count % mod)


import math
arr = list(map(int, input().split(' ')))
a = arr[0]
b = arr[1]
c = arr[2]
d = dict()

def numdiv(n):
	if n in d:
		return d[n]
	else:
		count = 0
		for i in range(1, int(math.sqrt(n) + 1)):
			if n % i == 0:
				count += 2
		if int(math.sqrt(n)) * int(math.sqrt(n)) == n:
			count -= 1
		d[n] = count
		return count
answer = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			answer += numdiv(i * j * k)
print(answer)


import sys
import time
import math
from functools import lru_cache
INF = 10 ** 18 + 3
EPS = 1e-10
MAX_CACHE = 10 ** 9
MOD = 1 << 30

def time_it(function, output=sys.stderr):

	def wrapped(*args, **kwargs):
		start = time.time()
		res = function(*args, **kwargs)
		elapsed_time = time.time() - start
		print('"%s" took %f ms' % (function.__name__, elapsed_time * 1000), file=output)
		return res
	return wrapped

@lru_cache(MAX_CACHE)
def calc_prime_divs(n):
	if n == 1:
		return ()
	sieve = [True] * (n // 2)
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i // 2]:
			sieve[i * i // 2::i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return (2,) + tuple((2 * i + 1 for i in range(1, n // 2) if sieve[i]))
divisors = calc_prime_divs(100 ** 3)

@lru_cache(MAX_CACHE)
def calc_num_of_divs(n):
	if n == 1:
		return 1
	k = 1
	for div in divisors:
		if n < div:
			return 2
		while n % div == 0:
			k += 1
			n //= div
		if k > 1:
			return k * calc_num_of_divs(n)

@time_it
def main():
	(a, b, c) = map(int, input().split())
	print(sum((calc_num_of_divs(i * j * k) % MOD for i in range(a, 0, -1) for j in range(b, 0, -1) for k in range(c, 0, -1))))

def set_input(file):
	global input
	input = lambda : file.readline().strip()

def set_output(file):
	global print
	local_print = print

	def print(*args, **kwargs):
		kwargs['file'] = kwargs.get('file', file)
		return local_print(*args, **kwargs)
set_input(open('input.txt', 'r') if 'MINE' in sys.argv else sys.stdin)
set_output(sys.stdout)
main()


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynum(x, l, r, a):
	if x >= l and x <= r:
		a.append(x)
	if x > r:
		a.append(x)
		return a
	if x < 10000000000.0:
		luckynum(x * 10 + 4, l, r, a)
		luckynum(x * 10 + 7, l, r, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def largestincreasingsubsequence(A):
	l = [1] * len(A)
	sub = []
	for i in range(1, len(l)):
		for k in range(i):
			if A[k] < A[i]:
				sub.append(l[k])
		l[i] = 1 + max(sub, default=0)
	return max(l, default=0)

def findOR(nums, N):
	prefix_sum = 0
	result = 0
	for i in range(N):
		result |= nums[i]
		prefix_sum += nums[i]
		result |= prefix_sum
	return result

def OR(a, n):
	ans = a[0]
	for i in range(1, n):
		ans |= a[i]
	return ans

def main():
	(a, b, c) = sep()
	n = a * b * c + 1
	d = [1] * n
	for i in range(2, n):
		for j in range(i, n, i):
			d[j] += 1
	cnt = 0
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				cnt += d[i * j * k]
	print(cnt % 2 ** 30)
main()


from __future__ import division, print_function
from collections import defaultdict
mod = 1073741824
import os
import sys
from io import BytesIO, IOBase

def main():
	(a, b, c) = map(int, input().split())

	def primeFactors(n):
		dic = defaultdict(int)
		factors = []
		while n % 2 == 0:
			dic[2] += 1
			n = n // 2
		i = 3
		while i * i <= n:
			while n % i == 0:
				dic[i] += 1
				n = n // i
			i += 2
		if n > 2:
			dic[n] += 1
		return dic

	def calc(n):
		res = 1
		dic = primeFactors(n)
		for val in dic.values():
			res = res * (val + 1) % mod
		return res
	ans = 0
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				ans = (ans + calc(i * j * k)) % mod
	print(ans)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(a, b, c) = map(int, input().split())
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
dict1 = {}
for prime in primes:
	dict1[prime] = 2

def countfact(num):
	if num in dict1:
		return dict1[num]
	xnum = num
	count = 1
	for prime in primes:
		if num % prime == 0:
			c = 0
			while num % prime == 0:
				c += 1
				num //= prime
			count *= c + 1
	dict1[xnum] = count
	return count
summ = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			summ += countfact(i * j * k)
print(summ % 1073741824)


import math as m
(a, b, c) = map(int, input().split())
ans = 0

def div(num):
	t = 0
	for i in range(1, int(m.sqrt(num)) + 1):
		if num % i == 0:
			t += 1
			if num // i != i:
				t += 1
	return t
dic = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			a = i * j * k
			if a in dic:
				ans = (ans + dic[a]) % 1073741824
			else:
				dic[a] = div(a)
				ans = (ans + dic[a]) % 1073741824
print(ans)


from math import sqrt, ceil
(a, b, c) = list(map(int, input().split()))
N = a * b * c + 1

def generate_prime(N, pp, prime):
	pp[1] = False
	for i in range(2, N):
		if pp[i]:
			prime.append(i)
			x = i ** 2
			while x < N:
				pp[x] = False
				x = x + i
prime = []
pp = [True] * N
generate_prime(N, pp, prime)

def divisor_count(num):
	ans = 1
	if num == 1:
		return 1
	for p in prime:
		factor = 0
		while num:
			if num % p == 0:
				factor += 1
				num = num // p
			else:
				ans = ans * (factor + 1)
				break
		if pp[num]:
			ans = ans * 2
			break
		if num == 1:
			break
	return ans
d = {}
res = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			t = i * j * k
			if t not in d:
				d[t] = divisor_count(t)
			res = res + d[t]
print(res)


import math
divisores = {}

def countDivisors(n):
	if n in divisores:
		return divisores[n]
	else:
		cnt = 0
		for i in range(1, int(math.sqrt(n)) + 1):
			if n % i == 0:
				if n / i == i:
					cnt = cnt + 1
				else:
					cnt = cnt + 2
		divisores[n] = cnt
		return cnt
(a, b, c) = list(map(int, input().split(' ')))
ult_a = 1
ult_b = 1
ult_c = 1
soma = 0
for i in range(a * b * c):
	ult_c = i % c + 1
	if i % c == 0:
		ult_b = ult_b % b + 1
	if i % (b * c) == 0:
		ult_a = ult_a % a + 1
	numero = ult_a * ult_b * ult_c
	numero = countDivisors(numero)
	soma = soma % 1073741824 + numero
print(soma % 1073741824)


(n, m, l) = map(int, input().split())
k = n * m * l
arr = [0] * (k + 1)
arr[0] = 1
arr[1] = 1
for i in range(2, k + 1):
	for j in range(i + i, k + 1, i):
		arr[j] += 1
	arr[i] += 2
su = 0
for i in range(1, n + 1):
	for j in range(1, m + 1):
		for k in range(1, l + 1):
			xx = i * j * k
			su += arr[xx]
print(su)


from sys import stdin, stdout

def insr():
	s = input()
	return list(s[:])

def inlt():
	return list(map(int, input().split()))
inp = inlt()
sol = [0] * 1000001

def count_divisors(a):
	if sol[a] != 0:
		return sol[a]
	(i, c) = (1, 0)
	while i * i <= a:
		if a % i == 0:
			if i * i != a:
				c += 1
			c += 1
		i += 1
	sol[a] = c
	return c
s = 0
for i in range(1, inp[0] + 1):
	for j in range(1, inp[1] + 1):
		for k in range(1, inp[2] + 1):
			s += count_divisors(i * j * k)
print(s % 1073741824)


import math
(a, b, c) = map(int, input().split())
n = a * b * c
d = [1] * (n + 1)
d[0] = 0
for i in range(2, n + 1):
	for j in range(i, n + 1, i):
		d[j] += 1
print(sum((d[i * j * k] for i in range(1, a + 1) for j in range(1, b + 1) for k in range(1, c + 1))) % (1 << 30))


(a, b, c) = map(int, input().split())

def count_div(x):
	count = 2
	for i in range(2, int(x ** 0.5) + 1):
		if not x % i:
			if i * i != x:
				count += 2
			else:
				count += 1
	return count
k = 10 ** 5
d = [0 for i in range(10 ** 6 + 1)]
d[1] = 1
d[2] = 2
d[3] = 2
N = 2 ** 30
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if not d[i * j * k]:
				d[i * j * k] = count_div(i * j * k)
			ans = (ans + d[i * j * k]) % N
print(ans)


primes = []
d = {}
for i in range(2, 100):
	if i not in d:
		primes.append(i)
		j = 2
		while i * j < 100:
			d[i * j] = 1
			j += 1

def solve(x, y, z):
	d = {}
	for p in primes:
		d[p] = 0
	for p in primes:
		if p > x and p > y and (p > z):
			break
		while x % p == 0:
			x /= p
			d[p] += 1
		while y % p == 0:
			y /= p
			d[p] += 1
		while z % p == 0:
			z /= p
			d[p] += 1
	ans = 1
	for p in primes:
		ans *= d[p] + 1
	return ans
(a, b, c) = map(int, input().split(' '))
ans = 0
seen = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			p = i * j * k
			if p in seen:
				ans = (ans + seen[p]) % 1073741824
			else:
				temp = solve(i, j, k)
				ans = (ans + temp) % 1073741824
				seen[p] = temp
print(ans)