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.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.StringTokenizer;


public class e {
	int N = 2000*2000 + 1;
	int prime[] = new int [N];
	
	int primes[] = new int[2000];
	int num_pr[] = new int[2001];

	void do_solve() throws NumberFormatException, IOException {
		int last_prime = 0;
		prime = new int[N];
		for(int i = 2; i < N; i++) {
			if (prime[i] == 0) {
				if (i < 2000) {
					primes[last_prime++] = i;
				}
				prime[i] = i;
				for(int j = (int)Math.min((long)i * i, N); j < N; j += i) {
					if (prime[j] == 0) {
						prime[j] = i;
					}
				}
			}
			if (i <= 2000) {
				num_pr[i] = last_prime;
			}
		}
//		debug("NUM_PR : ",num_pr);
		
		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) {
//			return 1;
//		}
//		
//		if (b < p) {
//			a = 1;
//			b = 1;
//			if (c < p * p) {
//				return 2 * (num_pr[c] - num_pr[p - 1]) + 1; 
//			}
//		}
//		
//		if (a < p) {
//			a = 1;
//		}
		
		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 += pa * 4; //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);
//		debug(a,b,c,p,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("");
	}

	void test(String name) throws IOException {
		out = new PrintWriter(new File(name));

		out.close();
	}

	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 "";
	}

	BigInteger add(BigInteger A, BigInteger B) {
		return A.add(B);
	}

	BigInteger mult(BigInteger A, BigInteger B) {
		return A.multiply(B);
	}

	BigInteger sub(BigInteger A, BigInteger B) {
		return A.subtract(B);
	}

	BigInteger div(BigInteger A, BigInteger B) {
		return A.divide(B);
	}

	BigInteger mi(BigInteger A) {
		return (BigInteger.ZERO).subtract(A);
	}

	BigInteger sq(BigInteger A) {
		return A.multiply(A);
	}

	BigInteger val(long a) {
		return BigInteger.valueOf(a);
	}

	int cmp(BigInteger a, BigInteger b) {
		return a.compareTo(b);
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;

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

	long _long() throws NumberFormatException, IOException {
		return Long.parseLong(_token());
	}

	double _double() throws NumberFormatException, IOException {
		return Double.parseDouble(_token());
	}

	int gcd(int a, int b) {
		if (a < 0)
			a = -a;
		if (b < 0)
			b = -b;
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	long gcd(long a, long b) {
		if (a < 0)
			a = -a;
		if (b < 0)
			b = -b;
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	BigInteger gcd(BigInteger a, BigInteger b) {
		if (cmp(a, val(0)) < 0)
			a = mi(a);
		if (cmp(b, val(0)) < 0)
			b = mi(b);
		return a.gcd(b);
	}
}