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

Solution:
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.StringTokenizer;


public class e {
	int N = 2002;
	int prime[] = new int [N];
	int primes[] = new int[N];
	int num_pr[] = new int[N];

	void do_solve() throws NumberFormatException, IOException {
		int last_prime = 0;
		for(int i = 2; i < N; i++) {
			if (prime[i] == 0) {
				primes[last_prime++] = i;
				for(int j = i * i; j < N; j += i) {
					prime[j] = i;
				}
			}
			num_pr[i] = last_prime;
		}
		
		int a = _int();
		int b = _int();
		int c = _int();
		
		long answer = get_answer(a, b, c, 0);
		
		out.println(answer);
	}

	HashMap <Long, Integer> hmp = new HashMap<Long, Integer>();
	private long get_answer(int a, int b, int c, int i) {
		if (primes[i] == 0)
			return 1;
		
		long ans = 0;
		int p = primes[i];
		
		int tmp[] = new int[]{a,b,c};
		Arrays.sort(tmp);
		a = tmp[0];
		b = tmp[1];
		c = tmp[2];
		
		if (c < p * p) {
			int pa = Math.max(num_pr[a] - num_pr[p-1], 0);
			int pb = Math.max(num_pr[b] - num_pr[p-1], 0);
			int pc = Math.max(num_pr[c] - num_pr[p-1], 0);
			
			ans += pa * (pb - 1) * (pc - 2) * 8; // xyz
			ans += pa * ((pb - 1) + (pc - 1)) * 4; //xy1 && x1z
			ans += pb * (pc - 1) * 4; //1xz
			
			ans += pa * ((pb - 1) + (pc - 1)) * 6; //xxy && xyx
			ans += pa * (pb - 1) * 6; //xyy
			
			ans += 4 * pa; //xxx
			
			ans += (pa + pb + pc) * 2; //x11 & 1x1 & 11x
			ans += (pa + pa + pb) * 3; //xx1 & x1x & 1xx
			
			ans++; //111
			return ans;
		}
		long hash = (((long)a) << 33) | (((long)b) << 22) | (c<<11) | i;
		if (hmp.containsKey(hash))
			return hmp.get(hash);
		
		for(int aa = a, u = 0; aa > 0; aa /= p, u++)
			for(int bb = b, v = 0; bb > 0; bb /= p, v++)
				for(int cc = c, w = 0; cc > 0; cc /= p, w++) {
					ans += get_answer(aa, bb, cc, i + 1) * (u + v + w + 1);
				}
		ans = ans & ((1 << 30) - 1);
		hmp.put(hash, (int)ans);
		return ans;
	}

	void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}

	void mainProgram() throws NumberFormatException, IOException {
		/*
		test("e.in");
		 */
		try {
			init(true, "e");
		} catch (Exception e) {
			init(false, "");
		}
		boolean multy = false;

		if (!multy) {
			while (in.ready() || st.hasMoreTokens()) {
				do_solve();
			}
		} else {
			for (int T = _int(); T > 0; --T) {
				do_solve();
			}
		}
		out.close();
	}

	void init(boolean FILE, String name) throws NumberFormatException,
			IOException {
		Locale.setDefault(Locale.US);
		if (FILE) {
			in = new BufferedReader(new FileReader(name + ".in"));
			out = new PrintWriter(name + ".out");
		} else {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}
		st = new StringTokenizer("");
	}
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		long T = System.currentTimeMillis();
		new e().mainProgram();
		System.err.println("Time of working: "
				+ (System.currentTimeMillis() - T) + " ms");
	}

	String _token() throws IOException {
		while (in.ready() && !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		if (st.hasMoreTokens())
			return st.nextToken();
		return "";
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;

	int _int() throws NumberFormatException, IOException {
		return Integer.parseInt(_token());
	}


}