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.

Source: codeforces | Difficulty: VERY_HARD
Tags: Combinatorics

Implementation

Number theory

Dynamic programming

Mathematics


Solutions:
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)


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

def getdivisors(n):
	divisors = 1
	temp = 0
	while n % 2 == 0:
		n //= 2
		temp += 1
	divisors *= temp + 1
	temp = 0
	i = 3
	while i < math.sqrt(n) + 1:
		while n % i == 0:
			temp += 1
			n //= i
			if n % i != 0:
				divisors *= temp + 1
				temp = 0
		i += 2
	if n > 2:
		divisors *= 2
	return divisors
(a, b, c) = [int(x) for x in input().split()]
hashmap = {}
summ = 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
			if x in hashmap:
				summ += hashmap[x]
			else:
				hashmap[x] = getdivisors(x)
				summ += hashmap[x]
print(summ)


def inp():
	return map(int, stdin.readline().split())

def factorize(n):
	(c, ans) = (1, 0)
	while c * c < n:
		if n % c == 0:
			ans += 2
		c += 1
	if c * c == n:
		ans += 1
	return ans
from sys import *
from collections import *
(a, b, c) = inp()
(mem, ans) = (defaultdict(int), 0)
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			pro = i * j * k
			if mem[pro] == 0:
				mem[pro] = factorize(pro)
			ans += mem[pro]
print(ans)


(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)


def main():
	from itertools import product
	from functools import reduce
	from operator import mul
	(a, b, c) = sorted(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)
	l = [None]
	for x in range(1, c + 1):
		tmp = [0] * 25
		for (i, p) in enumerate(primes):
			while not x % p:
				x //= p
				tmp[i] += 1
		l.append(tuple(tmp))
	res = 0
	cache = {}
	for (x, y, z) in product(range(1, a + 1), range(1, b + 1), range(1, c + 1)):
		xyz = x * y * z
		if xyz in cache:
			res += cache[xyz]
		else:
			cache[xyz] = u = reduce(mul, map(sum, zip(l[x], l[y], l[z], (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))), 1) & 1073741823
			res += u
	print(res & 1073741823)
main()


from functools import reduce
from collections import Counter
import time
import datetime

def time_t():
	print('Current date and time: ', datetime.datetime.now())
	print('Current year: ', datetime.date.today().strftime('%Y'))
	print('Month of year: ', datetime.date.today().strftime('%B'))
	print('Week number of the year: ', datetime.date.today().strftime('%W'))
	print('Weekday of the week: ', datetime.date.today().strftime('%w'))
	print('Day of year: ', datetime.date.today().strftime('%j'))
	print('Day of the month : ', datetime.date.today().strftime('%d'))
	print('Day of week: ', datetime.date.today().strftime('%A'))

def ip():
	return int(input())

def sip():
	return input()

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

def mips():
	return map(str, input().split())

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

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def prime(n):
	for i in range(3, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True
primes = []
for i in range(2, 101):
	if prime(i):
		primes.append(i)
(a, b, c) = mip()
count = 0
if a == 1 and b == 1 and (c == 1):
	print(1)
else:
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				q = i * j * k
				ans = 1
				for item in primes:
					if q < item:
						break
					y = 1
					while q % item == 0 and q >= 1:
						q = q // item
						y += 1
					ans = ans * y
				count += ans
	print(count)


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)


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
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 d(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
(a, b, c) = map(int, input().split())
out = 0
q = {}
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 q:
				q[e] = d(e)
			out += q[e]
print(out % 1073741824)


def easyNumbers():
	(a, b, c) = map(int, input().split())
	divisors = [1] * 1000001
	n = a * b * c
	sum = 0
	modulo = 1073741824
	for i in range(2, n + 1):
		for j in range(i, n + 1, i):
			divisors[j] += 1
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				sum = sum + divisors[i * j * k]
	print(sum % modulo)
easyNumbers()


(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)


lst = list(map(int, input().split()))
x = 1073741824
sum = 0
y = [0] * (lst[0] * lst[1] * lst[2] + 1)
(a, b, c) = lst
for i in range(1, a * b * c + 1):
	for j in range(i, a * b * c + 1, i):
		y[j] += 1
for i in range(1, lst[0] + 1):
	for j in range(1, lst[1] + 1):
		for k in range(1, lst[2] + 1):
			sum += y[i * j * k] % x
print(sum % x)


from collections import defaultdict
mod = 1073741824
(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)


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 os
import sys
from io import BytesIO, IOBase
mod = 1073741824
from math import sqrt, ceil

def solve(n):
	ans = 0
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				ans += 1
			else:
				ans += 2
	return ans

def main():
	(a, b, c) = map(int, input().split())
	ans = 0
	dp = [0] * (a * b * c + 1)
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				temp = i * j * k
				if dp[temp] == 0:
					dp[temp] = solve(temp)
				ans = (ans + dp[temp]) % mod
	print(ans)

def nouse0():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse1():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse2():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
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')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def nouse3():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse4():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse5():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
main()


(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)


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)


(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)


(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)


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)


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
import math

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if int(n / i) == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
d = dict()
(a, b, c) = map(int, input().split())
ans = 0
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 d:
				d[i * j * k] = countDivisors(i * j * k)
				ans += d[i * j * k]
			else:
				ans += d[i * j * k]
print(ans)


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


from collections import defaultdict

def divisorGenerator(n):
	large_divisors = []
	for i in range(1, int(n ** 0.5 + 1)):
		if n % i == 0:
			yield i
			if i * i != n:
				large_divisors.append(n / i)
	for divisor in reversed(large_divisors):
		yield divisor
(a, b, c) = map(int, input().split())
number_of_divisors = defaultdict()
result = 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
			if x in number_of_divisors:
				d = number_of_divisors[x]
			else:
				d = len(list(divisorGenerator(x)))
				number_of_divisors[x] = d
			result = (result + d) % 1073741824
print(result)


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)


from math import sqrt, floor
(a, b, c) = map(int, input().split())
product = a * b * c
ds = [0] * (product + 1)
for i in range(1, product + 1):
	j = 1
	while j * i <= product:
		ds[i * j] += 1
		j += 1
out = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			out += ds[i * j * k]
			out %= 1073741824
print(out)


(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]

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
dlist = [0] * (a * b * c + 1)
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			if dlist[i * j * k] == 0:
				dlist[i * j * k] = d(i * j * k)
			ans += dlist[i * j * k]
print(ans)


from collections import Counter

def factors(n):
	fact = Counter()
	i = 2
	while i * i <= n:
		while n % i == 0:
			fact[i] += 1
			n //= i
		i += 1
	if n != 1:
		fact[n] += 1
	fact[1] = 1
	return fact

def solve(a, b, c):
	fact = {i: factors(i) for i in range(1, max(a, b, c) + 1)}
	ans = 0
	cache = {}
	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 not in cache:
					f = fact[i] + fact[j] + fact[k]
					f[1] = 1
					res = 1
					for (k, v) in f.items():
						res *= v + 1
					cache[p] = res // 2
				ans += cache[p]
	return ans % 1073741824

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


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)


MOD = 1073741824

def findPrimeFact(n):
	fact = {}
	count = 0
	while n % 2 == 0:
		count += 1
		n //= 2
	if count:
		fact[2] = count
	for i in range(3, int(n ** 0.5) + 1, 2):
		count = 0
		while n % i == 0:
			count += 1
			n //= i
		if count:
			fact[i] = count
	if n > 2:
		fact[n] = 1
	return fact
(a, b, c) = map(int, input().split())
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			fact = findPrimeFact(i * j * k)
			temp = 1
			for l in fact:
				temp *= 1 + fact[l]
				temp %= MOD
			ans += temp
			ans %= MOD
print(ans % MOD)


import sys
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(a, b, c) = I()
MOD = 2 ** 30
ans = 0
primes = []
for i in range(2, 100):
	for j in range(2, i):
		if i % j == 0:
			break
	else:
		primes.append(i)
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ok = i * j * k
			res = 1
			for p in primes:
				cnt = 0
				while ok % p == 0:
					ok //= p
					cnt += 1
				res *= cnt + 1
			ans += res
			ans %= MOD
print(ans)


def gint():
	return int(input())

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

def gfloat():
	return float(input())

def gfloat_arr():
	return list(map(float, input().split()))

def pair_int():
	return map(int, input().split())
INF = 1 << 31
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
(a, b, c) = gint_arr()
n = a * b * c + 1
factors = [1] * n
for i in range(2, n):
	for j in range(i, n, i):
		factors[j] += 1
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 + factors[i * j * k]) % 1073741824
print(res)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

def li():
	return [int(i) for i in input().split()]

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

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

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	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 divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

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):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

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

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
rr = sieve(100)

def d(n):
	res = 1
	r = rr
	for i in rr:
		cnt = 1
		if i > n:
			return res
		while n % i == 0:
			n //= i
			cnt += 1
		res *= cnt
	return res

def main():
	(a, b, c) = mi()
	res = 0
	for i in range(1, a + 1, 1):
		for j in range(1, b + 1, 1):
			for k in range(1, c + 1, 1):
				res += d(i * j * k) % 1073741824
	print(res)
main()


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

def prime_divisors(n):
	if n in table:
		return table[n]
	total_divisors = 1
	prime_divisor = 2
	table_key = n
	while prime_divisor * prime_divisor <= n:
		current_prime_count = 1
		while n % prime_divisor == 0:
			n /= prime_divisor
			current_prime_count += 1
		total_divisors = total_divisors * current_prime_count
		prime_divisor += 1
	if n > 1:
		total_divisors *= 2
	table[table_key] = total_divisors
	return total_divisors
divisor_sum = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			divisor_sum += prime_divisors(i * j * k)
print(divisor_sum)


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)


import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def def_value():
	return 0

def nod(n):
	temp = n
	if dp[temp] > 0:
		return dp[temp]
	limit = int(sqrt(n)) + 1
	res = 1
	for i in range(2, limit + 1):
		a = 0
		while n % i == 0:
			n //= i
			a += 1
		res *= a + 1
	if n > 1:
		res *= 2
	dp[temp] = res
	return dp[temp]
(a, b, c) = invr()
mod = 1073741824
dp = [0] * (a * b * c + 1)
tot = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			tot += nod(i * j * k) % mod
print(tot)


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()


import math
prime = [2, 3, 5, 7, 11]
d = {}

def GeneratePrimes():
	for i in range(12, 1010):
		for j in prime:
			if i % j == 0:
				break
			if j * j > i:
				prime.append(i)
				break
		else:
			prime.append(i)

def UpperBound(x):
	l = 0
	h = len(prime)
	while l <= h:
		m = (l + h) // 2
		if x > prime[m]:
			l = m + 1
		elif x < prime[m]:
			h = m - 1
		else:
			return m
	return l
GeneratePrimes()

def NumberOfDiv(x):
	count = 1
	for i in prime:
		if i * i > x:
			break
		if x % i == 0:
			b = 0
			while x % i == 0:
				b += 1
				x //= i
			count *= b + 1
	if x != 1:
		count *= 2
	return count
(a, b, c) = map(int, input().split())
res = 0
mod = 2 ** 30
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			res += NumberOfDiv(i * j * k)
		res = res % mod
print(res % mod)


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 : 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)


abc = input().split(' ')
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])

def product(f1, f2, f3):
	fout = []
	for i in range(len(f1)):
		fout.append(f1[i] + f2[i] + f3[i])
	return fout

def no_of_factors(fin):
	n = 1
	for inn in fin:
		n *= inn + 1
	return n
primes = [2, 3, 5, 7]
for i in range(11, 101):
	bhul = True
	for j in primes:
		if i % j == 0:
			bhul = False
			break
	if bhul:
		primes.append(i)
compendium = []
for i in range(1, 101):
	factors = [0] * len(primes)
	for pp in range(len(primes)):
		di = int(i)
		while di % primes[pp] == 0:
			di /= primes[pp]
			factors[pp] += 1
	compendium.append(factors)
q = 0
iterations = 0
for i in range(a):
	for j in range(b):
		for k in range(c):
			q += no_of_factors(product(compendium[i], compendium[j], compendium[k]))
print(q)


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)


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)


(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())
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)


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

def divisor_sieve(n):
	table = [0] * (n + 1)
	for divisor in range(1, n + 1):
		for multipliers in range(divisor, n + 1, divisor):
			table[multipliers] += 1
	return table
table = divisor_sieve(a * b * c)
divisor_sum = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			divisor_sum += table[i * j * k]
print(divisor_sum)


(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)


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)


(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)


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 = ()

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

@time_it
def main():
	(a, b, c) = map(int, input().split())
	global divisors
	divisors = calc_prime_divs(a * b * c + 1)
	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()


(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)


from math import *

def div(x):
	s = 0
	for i in range(2, floor(sqrt(x)) + 1):
		if x % i == 0:
			s += 1
		if x % (x // i) == 0 and i != x // i:
			s += 1
	if x == 1:
		return s + 1
	return s + 2
d = [-1] * 1000001
(a, b, c) = map(int, input().split())
ans = 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] == -1:
				d[i * j * k] = div(i * j * k)
			ans += d[i * j * k]
print(ans)


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


(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)


import sys
import itertools
import math
import collections
from collections import Counter

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

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 flin(d, x, default=-1):
	f = l = -1
	for i in range(len(d)):
		if d[i] == x:
			if f == -1:
				f = i
			l = i
	if f == -1:
		return (default, default)
	else:
		return (f, l)

def ceil(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 prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
pr = sieve(10 ** 6 // 2)

def divn(n):
	res = 1
	for i in pr:
		if n == 1:
			return res
		t = 1
		while n % i == 0:
			t += 1
			n = n // i
		res *= t
(a, b, c) = mi()
mem = [0] * (10 ** 6 + 1)
res = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			n = i * j * k
			if mem[n] == 0:
				mem[n] = divn(i * j * k)
			res += mem[n]
print(res % 1073741824)


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]
l = []
l.append(primes)
for i in range(100):
	ii = i + 1
	a = [0] * 25
	for j in range(25):
		if ii == 1:
			break
		while ii % primes[j] == 0:
			a[j] += 1
			ii = ii / primes[j]
	l.append(a)
(a, b, c) = map(int, input().split())
ans = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			div = 1
			for d in range(25):
				div *= 1 + l[i][d] + l[j][d] + l[k][d]
			ans += div
ans %= 1073741824
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 sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

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 graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def solve():
	(a, b, c) = sep()
	dp = [0] * (a * b * c + 1)
	for i in range(1, a * b * c + 1):
		j = 1
		while i * j <= a * b * c:
			dp[i * j] += 1
			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 += dp[i * j * k]
	print(ans % 1073741824)
testcase(1)


(a, b, c) = map(int, input().split())
n = a * b * c + 1
d = [1] * n
for i in range(2, n):
	for j in range(i, n, 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))


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)


def primes1(n):
	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] + [2 * i + 1 for i in range(1, n // 2) if sieve[i]]

def d(x):
	y = 0
	ans = 1
	for i in primes_list:
		if x < i:
			break
		y = 1
		while x % i == 0 and x >= i:
			x /= i
			y += 1
		ans *= y
	return ans
primes_list = primes1(100)
x = 0
t = {}
(a, b, c) = list(map(int, input().split()))
s = []
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			q = i * j * k
			if q not in t:
				t[q] = d(q)
			x += t[q]
print(x % 1073741824)


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())

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)


def d(x):
	if x == 1:
		return 1
	k = 0
	i = 1
	while i * i <= x:
		if x % i == 0:
			k += 2
			if i * i == x:
				k -= 1
		i += 1
	return k
(a, b, c) = map(int, input().split())
n = 1073741824
ans = 0
s = [0 for i in range(1000001)]
for x in range(1, a + 1):
	for y in range(1, b + 1):
		for z in range(1, c + 1):
			p = x * y * z
			if s[p] == 0:
				s[p] = d(p)
			ans = (ans + s[p]) % n
print(ans)


import sys

def ints_input():
	return [int(i) for i in sys.stdin.readline().strip('\n').split(' ')]

def print_list(arr):
	sys.stdout.writelines((str(x) + ' ' for x in arr))
	sys.stdout.write('\n')

def fast_input(type=str):
	return type(sys.stdin.readline().strip('\n'))
memo = {}

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


(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)


from functools import lru_cache
from math import sqrt, ceil

@lru_cache(None)
def countDevisor(n):
	count = 0
	for i in range(int(sqrt(n))):
		if n % (i + 1) == 0:
			if n / (i + 1) == i + 1:
				count += 1
			else:
				count += 2
	return count
(a, b, c) = list(map(int, input().split()))
modulo = 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):
			ans += countDevisor(i * j * k)
print(ans % modulo)