#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#define _USE_MATH_DEFINES //must before including math.h.
#include <math.h>
#include <string>
#include <vector>
#include <list>
#include <map>
#pragma comment (linker, "/STACK:256000000")
using namespace std;

const int MAX_ARRAY = 100005;

string num2str(int i)
{
        stringstream ss;
        ss << i;
        return ss.str();
}

//�ַ�ָ��
std::vector<std::string> Split(std::string str,std::string pattern)
{
     std::string::size_type pos;
     std::vector<std::string> result;
     str+=pattern;//��չ�ַ��Է������
     std::string::size_type size=str.size();

     for(int i=0; i<size; i++)
     {
         pos=str.find(pattern, i);
         if(pos < size)
         {
             std::string s=str.substr(i,pos-i);
             result.push_back(s);
             i=pos+pattern.size()-1;
         }
     }
    return result;
}

bool IsPrimer(int x)
{
	if (x < 2)
	{
		return false;
	}

    for (int i = 2;i <= sqrt(double(x));i++)
    {
        if (x % i == 0)
        {
            return false;
        }
    }

    return true;
}

bool DesCmp(int a, int b)
{
    return a > b;
}

int main()
{
	int a, b, c;
	scanf("%d%d%d", &a, &b, &c);
	int ans = 0;
	int d[1000005];
	d[1] = 1;

	for (int i = 2;i <= a * b * c;i++)
	{
		d[i] = 2;
	}

	for (int i = 2;i <= a * b * c / 2;i++)
	{
		for (int j = 2;j * i <= a * b * c;j++)
		{
			d[i * j]++;
		}
	}

	for (int i = 1;i <= a;i++)
	{
		for (int j = 1;j <= b;j++)
		{
			for (int k = 1;k <= c;k++)
			{
				ans =  (ans + d[i * j * k]) % 1073741824;
			}
		}
	}

	printf("%d\n", ans);
	//system("pause");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define PI  3.14159265
#define EPS (1e-7);
#define endl "\n"
typedef long long ll;
typedef long double ld;

inline int D(){
	int t;
	scanf("%d",&t);
	return t;
}
inline ll llD(){
	ll t;
	scanf("%lld",&t);
	return t;
}

const int N=1e6 +5;
ll arr[N],cost[N];

vector<ll> vec;

int main(){

	int a=D(),b=D(),c=D();
	int z=min(a,min(b,c));
	for(int i=1;i<=a;++i)
		for(int j=1;j<=b;++j)
			for(int k=1;k<=c;++k)
				vec.push_back(1ll*i*j*k);

	ll ans=0,Y=(1ll<<30);
	for(auto x:vec){
		if(arr[x] == 0){
			int i;
			for(i=1;i*i<x;++i)
				if(x%i == 0)
					arr[x]+=2;
			if(i*i == x)
				++arr[x];
		}

		ans=(ans%Y + arr[x]%Y)%Y;
	}

	printf("%lld",ans);

}

//https://codeforces.com/problemset/problem/236/B
#include <bits/stdc++.h>
using namespace std;
int a,b,c,cnt;
int sum=0;
const int MOD =1073741824  ;
int visted[1000001];
int countDivisors (int n)
{
    if(visted[n])
        return visted[n];
    cnt=0;
    for(int i=1; i<=sqrt(n); i++)
    {
        if(n%i==0)
        {
            if(n/i==i)
                cnt++;
            else
                cnt+=2;
        }

    }
    visted[n]=cnt;
    return cnt;
}

int main()
{
    cin>>a>>b>>c;
    sum=0;

    for(int i=1; i<=a; i++)
        for(int j=1; j<=b; j++)
            for(int k=1; k<=c; k++)
                sum+=countDivisors(i*j*k);

    cout<<sum%MOD<<endl;
}

#include <bits/stdc++.h>
using namespace std;

#define PI  3.14159265
#define EPS (1e-7);
#define endl "\n"
typedef long long ll;
typedef long double ld;

inline int D(){
	int t;
	scanf("%d",&t);
	return t;
}
inline ll llD(){
	ll t;
	scanf("%lld",&t);
	return t;
}

const int N=1e6 +5;
ll arr[N];

int main(){
	int a=D(),b=D(),c=D();
	ll ans=0,Y=(1ll<<30);
	for(int i=1;i<=a;++i)
		for(int j=1;j<=b;++j)
			for(int k=1;k<=c;++k){
				ll x=1ll*i*j*k;
				if(arr[x] == 0){
					int cnt=0,i;
					for(i=1;i*i<x;++i)
						if(x%i == 0)
							cnt+=2;
					if(i*i == x)
						++cnt;
					arr[x]=cnt;
				}
				ans=(ans%Y + arr[x]%Y)%Y;
			}

	printf("%lld",ans);

}

#include<bits/stdc++.h>
using namespace std;
const int N=2005;
const int p=1073741824;
typedef long long ll;
int miu[N],cnt,prim[N],a,b,c,g[N][N];
bool vis[N];
void init()
{
	miu[1]=1;
	for(int i=2;i<=N-5;++i)
	{
		if(!vis[i])
		{
			prim[++cnt]=i;
			miu[i]=-1;
		}
		for(int j=1;j<=cnt&&i<=(N-5)/prim[j];++j)
		{
			vis[i*prim[j]]=1;
			if(i%prim[j]==0)
			{
				miu[i*prim[j]]=0;
				break;
			}
			miu[i*prim[j]]=-miu[i];
		}
	}
}
int gcd(int x,int y)
{
	if(!y) return g[x][y]=x;
	if(g[x][y]) return g[x][y];
	return g[x][y]=gcd(y,x%y);
}
int calc(int n,int d,int k)
{
	int ans=0;
	for(int i=1;i<=n;++i)
	if(gcd(d*i,k)==1) ans+=(n/i);
	return ans%p;
}
ll F(int i,int d)
{
	int t=b/d;ll ret=0;
	for(int j=1;j<=t;++j)
	if(gcd(i,j)==1) ret=(ret+b/(1ll*j*d))%p;
	return ret;
}
ll G(int i,int d)
{
	int t=c/d;ll ret=0;
	for(int j=1;j<=t;++j)
	if(gcd(i,j)==1) ret=(ret+c/(1ll*j*d))%p;
	return ret;
}
int main()
{
	init();
	scanf("%d%d%d",&a,&b,&c);
	if(a>b) swap(a,b);
	if(a>c) swap(a,c);
	if(b>c) swap(b,c);
	ll ans=0;
	for(int i=1;i<=a;++i)
	{
		for(int d=1;d<=b;++d)
		if(gcd(i,d)==1)
			ans=(ans+1ll*(a/i)*miu[d]%p*F(i,d)%p*G(i,d)%p)%p;
	}
	printf("%lld\n",(ans+p)%p);
}

#include<bits/stdc++.h>
#define ll long long
#define maxn 4000000
using namespace std;
const int ha=1<<30;
int a,b,c,miu[maxn+5];
int zs[maxn/5],t=0,D,low[maxn+5];
int d[maxn+5],to[maxn+5],ans=0;
bool v[maxn+5];

inline void init(){
	for(int i=1;i<=a;i++)
	    for(int j=1;j<=b;j++) to[i*j]++;
	miu[1]=d[1]=low[1]=1;

	for(int i=2;i<=maxn;i++){
		if(!v[i]) zs[++t]=i,miu[i]=-1,low[i]=i,d[i]=2;
		for(int j=1,u;j<=t&&(u=zs[j]*i)<=maxn;j++){
			v[u]=1;

			if(!(i%zs[j])){
				low[u]=low[i]*zs[j];
				if(low[i]==i) d[u]=d[i]+1;
				else d[u]=d[low[u]]*d[i/low[i]];
				break;
			}
			low[u]=zs[j],d[u]=d[i]<<1,miu[u]=-miu[i];
		}
	}

	for(int i=1;i<=maxn;i++) d[i]+=d[i-1];
}

inline int add(int x,int y){
	x+=y;
	return x>=ha?x-ha:x;
}

inline void calc(){
	for(int i=1,sum;i<=c;i++) if(miu[i]){
		sum=0;
		for(int j=i;j<=D;j+=i) sum=add(sum,to[j]*(ll)(d[j/i]-d[j/i-1])%ha);
		sum=sum*(ll)d[c/i]%ha;
		if(miu[i]==1) ans=add(ans,sum);
		else ans=add(ans,ha-sum);
	}
	printf("%d\n",ans);
}

int main(){
	scanf("%d%d%d",&a,&b,&c);
	if(a>b) swap(a,b);
	if(a>c) swap(a,c);
	if(b>c) swap(b,c);
	D=a*b;

	init();
	calc();

	return 0;
}

#include <iostream>
#include <map>
using namespace std;
long long  minFactor[1000005];
const long long mod=1073741824;
long long  cal(long long  a){
    map<long long ,long long > m;
    while(a!=1){
        m[minFactor[a]]++;
        a/=minFactor[a];
    }
    long long  p=1;
    for(auto it=m.begin();it!=m.end();it++){
        p*=(it->second+1);
    }
    return p;
}
int  main(){
    long long  a,b,c;
    cin>>a>>b>>c;
    for(long long  i=1;i<=1000000;i++)minFactor[i]=i;
    for(long long  i=2;i<=1000;i++){
        if(minFactor[i]==i){
            for(long long  j=i*i;j<=1000000;j+=i){
                if(minFactor[j]==j)minFactor[j]=i;
            }
        }
    }
    long long ans=0;
    for(long long  i=1;i<=a;i++){
        for(long long  j=1;j<=b;j++){
            for(long long  k=1;k<=c;k++){
                ans+=cal(i*j*k);
                ans%=mod;
            }
        }
    }
    cout<<ans;
    return 0;
}

/*
URL_HERE
*/
/*

*/
#ifdef _WIN32
#pragma warning(disable:4996)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <math.h>
#include <queue>
using namespace std;

FILE* _fin = stdin;
FILE* _fout = stdout;
#define PI 3.141592653589793238462643383279502884197169399375105820974
#define ten5p1 100001
#define ten6p1 1000001
#define ten8p1 100000001
#define ten9p1 1000000001
#define uint unsigned int
#define ll long long
#define ull unsigned long long
#define rep(var,n) for(int var=0;var<n;++var)
#define repi(n) rep(i,n)
#define repj(n) rep(j,n)
#define repi1(n) for(int i=1;i<n;++i)
#define repj1(n) for(int j=1;j<n;++j)
int _min(int a, int b) { return a <= b ? a : b; }
int _min(ll a, ll b) { return a <= b ? a : b; }
int _max(int a, int b) { return a >= b ? a : b; }
int _max(ll a, ll b) { return a >= b ? a : b; }
void zero(int* data, int n) { memset(data, 0, sizeof(int) * n); }
void zero(ll* data, int n) { memset(data, 0, sizeof(ll) * n); }
void zero(char* data, int n) { memset(data, 0, sizeof(char) * n); }
char readc() { char var; fscanf(_fin, "%c", &var); return var; }
int readi() { int var; fscanf(_fin, "%d", &var); return var; }
double readlf() { double var; fscanf(_fin, "%lf", &var); return var; }
ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; }
void repread(int* data, int n) { repi(n) data[i] = readi(); }
void repread(ll* data, int n) { repi(n) data[i] = readll(); }
int reads(char* str, int maxsize)
{
	for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; }
	int slen = strlen(str); if (slen == 0) return 0;
	if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0;
	return slen;
}

#define writec(var) fprintf(_fout,"%c",var)
#define writecsp(var) fprintf(_fout,"%c ",var)
#define writecln(var) fprintf(_fout,"%c\n",var)
#define writei(var) fprintf(_fout,"%d",var)
#define writeisp(var) fprintf(_fout,"%d ",var)
#define writellsp(var) fprintf(_fout,"%lld ",var)
#define writeiln(var) fprintf(_fout,"%d\n",var)
#define writellln(var) fprintf(_fout,"%lld\n",var)
#define writeulln(var) fprintf(_fout,"%llu\n",var)
#define writefln(var) fprintf(_fout,"%f\n",var)
#define writes(str) fprintf(_fout,"%s",str)
#define writesp() fprintf(_fout," ")
#define writeln() fprintf(_fout,"\n")
#define RUN_LOCAL(testfilename) {_fin = fopen(testfilename, "r"); if(_fin==NULL) _fin=stdin;}
#define swap(type,a, b) {type t=a;a=b;b=t;}
#define sort(data,n) std::sort(data,data+n)
//#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell is this...
ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll g = gcd(a, b); return (a / g) * b; }
void reverse(char* data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } }
void reverse(int* data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } }

#define _Vec(type, name) \
struct name { type* data; int size; int n; };\
void init(name* t, int size) { t->data = (type*)malloc(sizeof(type) * size); t->size = size; t->n = 0; }\
void resize(name* t) { int ns = t->size * 1.2f; t->data = (type*)realloc(t->data, sizeof(type) * ns); t->size = ns; }\
void add(name* t, type val) { if (t->n >= t->size) resize(t); int k = t->n; t->data[k] = val; t->n = k + 1; }\
void free(name* t) { free(t->data);}
_Vec(int, Veci)
_Vec(long long, Vecll)
_Vec(char*, Vecs)

#define _ispal(type, name) int name(type* a, type* b, int n){repi(n){if (a[i] != b[n - i - 1]){return 0;}}return 1;}
_ispal(int, ispali)
_ispal(char, ispalc)

#define _Pair(type, name) struct name{type x, y;}; \
int cmp_##name(const void* _a, const void* _b)\
{\
	name* a = (name*)_a;name* b = (name*)_b;\
	if (a->x < b->x) return -1;\
	else\
	{\
		if (a->x == b->x)\
		{\
			if (a->y == b->y) return 0;\
			if (a->y < b->y) return -1;\
			else return 1;\
		}\
		else\
		{\
			return 1;\
		}\
	}\
}\
void sort_##name(name* d, int n){qsort(d, n, sizeof(name), cmp_##name);}
	_Pair(int, Pairi)

	int cmp_Str(const void* _a, const void* _b) { char* a = *((char**)_a); char* b = *((char**)_b); return strcmp(a, b); }
void sort_Str(char** str, int n) { qsort(str, n, sizeof(char*), cmp_Str); }

ll expmod(ll x, ll n, ll m) {
	ll ans = 1;
	for (; n;) {
		if (n & 1) ans = (ans * x) % m;
		x = (x * x) % m;
		n >>= 1;
	}
	return ans;
}

ll combmod(ll n, ll k, ll m) {
	ll ret = 1;
	ll div = 1;
	for (ll i = 0; i < k; ++i) {
		ret = (ret * (n - i) % m) % m;
		div = (div * (i + 1)) % m;
	}
	div = expmod(div, m - 2, m) % m;
	return (ret * div) % m;
}

int next_perm(int* data, int n)
{
	//find first i,i+1 where d[i]<d[i+1]
	int rootidx = -1;
	for (int i = n - 2; i >= 0; --i)
	{
		if (data[i] < data[i + 1])
		{
			rootidx = i;
			break;
		}
	}

	if (rootidx == -1) return 0;

	int ceilingidx = rootidx + 1;
	//find smallest d[x] after d[rooti] where d[x]>d[rooti]
	for (int i = rootidx + 2; i < n; ++i)
	{
		if (data[i] > data[rootidx] && data[i] < data[ceilingidx])
		{
			ceilingidx = i;
		}
	}

	swap(int, data[rootidx], data[ceilingidx]);
	sort(&data[rootidx + 1], n - rootidx - 1);
	return 1;
}
int count_digits(ll a)
{
	int k = 0;
	for (;;)
	{
		if (a == 0)break;
		k++;
		a /= 10;
	}
	return k;
}

/*
use only when val EXISTS in data
*/
int bs_exists(int* data, int n, int val)
{
	int left = 0;
	int right = n - 1;
	for (; left < right;)
	{
		int mid = (left + right + 1) >> 1;
		if (data[mid] <= val) left = mid;
		else right = mid - 1;
	}
	return right;
}
//------------------------------------------

//------------

int main()
{
	RUN_LOCAL("xx11.txt");
	int a = readi();
	int b = readi();
	int c = readi();
	static int p[100 * 100 * 100 + 1];
	zero(p, 1000001);
	for (int i = 2; i < 1000001; ++i)
	{
		for (int j = 1; i * j < 1000001; ++j)
		{
			p[i * j]++;
		}
	}

	ll sum = 0;
	for (int i = 1; i <= a; ++i)
	{
		for (int j = 1; j <= b; ++j)
		{
			for (int k = 1; k <= c; ++k)
			{
				//printf("%d %d %d\n", i, j, k);
				int x = i*j*k;
				sum += p[x] + 1;
				sum %= 1073741824;
			}
		}
	}
	writellln(sum);
	return 0;
}

#include <bits/stdc++.h>
#define clr(x) memset(x,0,sizeof (x))
#define outval(x) printf(#x" = %d\n",x)
#define For(x,a,b) for (int x=a;x<=b;x++)
#define Fod(x,b,a) for (int x=b;x>=a;x--)
#define pb push_back
using namespace std;
typedef long long LL;
LL read(){
	LL x=0,f=0;
	char ch=getchar();
	while (!isdigit(ch))
		f|=ch=='-',ch=getchar();
	while (isdigit(ch))
		x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const int N=2005,mod=1<<30,amod=mod-1;
int a,b,c;
int u[N];
int gcd[N][N];
void Add(int &x,int y){
	if ((x+=y)>=mod)
		x-=mod;
}
void Del(int &x,int y){
	if ((x-=y)<0)
		x+=mod;
}
int main(){
	a=read(),b=read(),c=read();
	u[1]=1;
	For(i,1,N-1)
		for (int j=i<<1;j<N;j+=i)
			Del(u[j],u[i]);
	For(i,0,N-1)
		For(j,0,N-1)
			gcd[i][j]=gcd[j][i]=j?gcd[j][i%j]:i;
	int ans=0;
	For(p,1,a)
		For(z,1,c){
			if (gcd[p][z]!=1)
				continue;
			int sa=0,sb=0;
			For(i,1,a/p)
				if (gcd[i][z]==1)
					Add(sa,a/p/i);
			For(i,1,b/p)
				if (gcd[i][z]==1)
					Add(sb,b/p/i);
			Add(ans,(LL)u[p]*(c/z)%mod*sa%mod*sb%mod);
		}
	cout<<ans<<endl;
	return 0;
}

#include <cstdio>
#include <vector>
#include <iostream>
using namespace std;

const int Mod = 1 << 30 , MAXN = 2000;
int t , A , B , C , n , m;
int cnt , vt[ MAXN + 5 ] , Deg[ MAXN + 5 ];
struct node {
	int u , v , w;
}E[ 8 * MAXN + 5 ];
struct Edge {
	int v , w;
};
vector< Edge > Graph[ MAXN + 5 ];
int k , prime[ MAXN + 5 ] , mu[ MAXN + 5 ] , f[ 3 ][ MAXN + 5 ];
bool vis[ MAXN + 5 ];

void Init( ) {
	mu[ 1 ] = 1;
	for( int i = 2 ; i <= n ; i ++ ) {
		if( !vis[ i ] ) {
			prime[ ++ k ] = i;
			mu[ i ] = -1;
		}
		for( int j = 1 ; j <= k && 1ll * i * prime[ j ] <= MAXN ; j ++ ) {
			vis[ i * prime[ j ] ] = 1;
			if( i % prime[ j ] == 0 ) break;
			mu[ i * prime[ j ] ] = -mu[ i ];
		}
	}
	for( int i = 1 ; i <= n ; i ++ ) {
		for( int j = i ; j <= n ; j += i ) {
			f[ 0 ][ i ] = ( f[ 0 ][ i ] + A / j ) % Mod;
			f[ 1 ][ i ] = ( f[ 1 ][ i ] + B / j ) % Mod;
			f[ 2 ][ i ] = ( f[ 2 ][ i ] + C / j ) % Mod;
		}
	}
}

int chk( long long x ) {
	return ( x % Mod + Mod ) % Mod;
}
int Calc( int u , int v , int w ) {
	return chk( 1ll * f[ 0 ][ u ] * f[ 1 ][ v ] % Mod * f[ 2 ][ w ] % Mod );
}
int Gcd( int a , int b ) {
	return !b ? a : Gcd( b , a % b );
}
int Solve( ) {
	int Ans = 0;

	for( int i = 1 ; i <= m ; i ++ )
		Ans = ( Ans + chk( mu[ i ] * mu[ i ] * mu[ i ] * Calc( i , i , i ) ) ) % Mod;
	for( int d = 1 ; d <= n ; d ++ )
		for( int i = 1 ; i <= n / d ; i ++ )
			for( int j = i + 1 ; j <= n / i / d ; j ++ ) {
				int u = i * d , v = j * d , l = i * j * d;
				if( Gcd( i , j ) != 1 || !mu[ u ] || !mu[ v ] ) continue;
				Ans = ( Ans + chk( mu[ u ] * mu[ u ] * mu[ v ] * chk( 1ll * Calc( u , l , l ) + Calc( l , u , l ) + Calc( l , l , u ) ) ) ) % Mod;
				Ans = ( Ans + chk( mu[ u ] * mu[ v ] * mu[ v ] * chk( 1ll * Calc( v , l , l ) + Calc( l , v , l ) + Calc( l , l , v ) ) ) ) % Mod;
				E[ ++ cnt ] = { u , v , l };
			}
	for( int i = cnt , u , v , w ; i >= 1 ; i -- ) {
		u = E[ i ].u , v = E[ i ].v , w = E[ i ].w;
		if( Deg[ u ] < Deg[ v ] || ( Deg[ u ] == Deg[ v ] && u < v ) )
			Graph[ u ].push_back( { v , w } );
		else
			Graph[ v ].push_back( { u , w } );
	}
	for( int u = 0 ; u <= n ; u ++ ) {
		if( !mu[ u ] ) continue;
		for( int i = 0 ; i < Graph[ u ].size( ) ; i ++ ) vt[ Graph[ u ][ i ].v ] = Graph[ u ][ i ].w;
		for( int i = 0 ; i < Graph[ u ].size( ) ; i ++ ) {
			int v = Graph[ u ][ i ].v , uw = Graph[ u ][ i ].w;
			if( !mu[ v ] ) continue;
			for( int j = 0 ; j < Graph[ v ].size( ) ; j ++ ) {
				int w = Graph[ v ][ j ].v , vw = Graph[ v ][ j ].w;
				if( !mu[ w ] ) continue;
				if( vt[ w ] ) {
					int ww = vt[ w ];
					Ans = ( Ans + chk( mu[ u ] * mu[ v ] * mu[ w ] * chk( 1ll * Calc( uw , vw , ww ) + Calc( uw , ww , vw ) + Calc( vw , uw , ww ) + Calc( vw , ww , uw ) + Calc( ww , uw , vw ) + Calc( ww , vw , uw ) ) ) ) % Mod;
				}
			}
		}
		for( int i = 0 ; i < Graph[ u ].size( ) ; i ++ ) vt[ Graph[ u ][ i ].v ] = 0;
	}
	return Ans;
}

int main( ) {
	scanf("%d %d %d", &A , &B , &C );
	n = max( A , max( B , C ) );
	m = min( A , min( B , C ) );
	Init( );
	printf("%d\n", Solve( ) );
	return 0;
}

#include <iostream>
using namespace std;
bool divk[1000000];
int main()
{
    int num_div[1000001];
    num_div[1] = 1;
    int q = 2, steps;
    while (q <= 1000000)
    {

        for (long int y = q; y <= 1000000; y += q)
        {

            if (!divk[y])
            {
                divk[y] = true;
                num_div[y] = 2;
            }
            else
//
                num_div[y]++;

        }       q++;
    }

    int arr[101][101][101];
    int i, j, k, r, s, t, sum = 0;
    for (i = 1; i <= 100; i++)
        for (j = 1; j <= 100; j++)
            for (k = 1; k <= 100; k++)
                arr[i][j][k] = i*j*k;
    cin >> r >> s >> t;
    for (i = 1; i <= r; i++)
        for (j = 1; j <= s; j++)
            for (k = 1; k <= t; k++)
                sum += num_div[arr[i][j][k]];
    cout << sum ;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXSIZE=10000020;
int bufpos;
char buf[MAXSIZE];
#define NEG 0
void init(){
	#ifdef LOCAL
		freopen("5276.txt","r",stdin);
	#endif
	buf[fread(buf,1,MAXSIZE,stdin)]='\0';
	bufpos=0;
}
#if NEG
int readint(){
	bool isneg;
	int val=0;
	for(;!isdigit(buf[bufpos]) && buf[bufpos]!='-';bufpos++);
	bufpos+=(isneg=buf[bufpos]=='-');
	for(;isdigit(buf[bufpos]);bufpos++)
		val=val*10+buf[bufpos]-'0';
	return isneg?-val:val;
}
#else
int readint(){
	int val=0;
	for(;!isdigit(buf[bufpos]);bufpos++);
	for(;isdigit(buf[bufpos]);bufpos++)
		val=val*10+buf[bufpos]-'0';
	return val;
}
#endif
char readchar(){
	for(;isspace(buf[bufpos]);bufpos++);
	return buf[bufpos++];
}
int readstr(char* s){
	int cur=0;
	for(;isspace(buf[bufpos]);bufpos++);
	for(;!isspace(buf[bufpos]);bufpos++)
		s[cur++]=buf[bufpos];
	s[cur]='\0';
	return cur;
}
#define lcm lcm__
int mu[5002],f[5002],c[5002];
void sieve(int n){
	mu[1]=1;
	for(int i=1;i<=n;i++){
		f[i]++;
		for(int j=i*2;j<=n;j+=i)
			mu[j]-=mu[i],f[j]++;
	}
	for(int i=1;i<=n;i++)
		f[i]+=f[i-1];
}
int lcm[5002][5002];
int deg[5002];
vector<int> a[5002];
int main(){
	init();
	int x=readint(),y=readint(),z=readint(),n=max(max(x,y),z);
	sieve(n);
	for(int i=1;i<=n;i++){
		lcm[i][0]=lcm[0][i]=i;
		for(int j=1;j<=i;j++)
			lcm[i][j]=lcm[j][i]=lcm[j][i%j];
	}
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			lcm[i][j]=i*j/lcm[i][j];
	int ans=0;
	/*for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			for(int k=1;k<=n;k++)
				ans+=mu[i]*mu[j]*mu[k]*f[x/lcm[i][j]]*f[y/lcm[j][k]]*f[z/lcm[i][k]];
	printf("%d",ans&((1<<30)-1));
	return 0;*/
	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
			if (lcm[i][j]<=n){
				a[i].push_back(j);
				a[j].push_back(i);
			}
	for(int i=1;i<=n;i++){
		int u=i;
		for(int j=0;j<a[i].size();j++){
			int v=a[i][j];
			if (a[v].size()>a[i].size() || (a[v].size()==a[i].size() && i<v)){
				for(int k=0;k<a[i].size();k++){
					int w=a[i][k];
					if (lcm[v][w]<=n && w!=v){
						ans+=mu[w]*mu[u]*mu[v]*
						(f[x/lcm[u][v]]*f[y/lcm[v][w]]*f[z/lcm[u][w]]+f[x/lcm[u][v]]*f[y/lcm[u][w]]*f[z/lcm[v][w]]);
					}
				}
			}
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=0;j<a[i].size();j++){
			int v=a[i][j],lc=lcm[i][v];
			ans+=mu[i]*mu[i]*mu[v]*
			(f[x/i]*f[y/lc]*f[z/lc]+f[x/lc]*f[y/i]*f[z/lc]+f[x/lc]*f[y/lc]*f[z/i]);
		}
		ans+=mu[i]*mu[i]*mu[i]*f[x/i]*f[y/i]*f[z/i];
	}
	printf("%d",ans&((1<<30)-1));
}

/*I Believe Whatever Doesn't Kill You Simply Makes You Stranger*/
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <string>
#include <vector>
#include<set>
#include <deque>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <sstream>
#include<utility>
#include <stdio.h>
#define se second
#define fi first
#define pb push_back
#define pi 3.14159265358979323846264338
#define MIN(a,b) (((a)<(b)) ? a : b)
#define MAX(a,b) (((a)>(b)) ? a : b)
#define lp(x,n)for(int i=0; i<n; i++)
#define lop(x,n)for(int i=n; i>=0; i--)
#define ull unsigned long long
#define ld long double
#define ll long long
#define w while
#define ret return
#define SORT(a) a.begin(),a.end()
 /*
                 _                               _
                | |                             | |
 _ __ ___   __ _| |__  _ __ ___   ___  _   _  __| |
| '_ ` _ \ / _` | '_ \| '_ ` _ \ / _ \| | | |/ _` |
| | | | | | (_| | | | | | | | | | (_) | |_| | (_| |
|_| |_| |_|\__,_|_| |_|_| |_| |_|\___/ \__,_|\__,_|

i like this job i like it !
*/
using namespace std;
ll n, m, x, up(0), len(0), f(0), f2(0);
ll test[1000001] = { 0 };
ll num_div(ll n){
	ll Co(00); //cin >> n;
	for (ll i = 1; i*i <= n; i++){
		if (n%i == 0){
			//cout << i << " " << n / i << "\n";
			if (i != n / i){
				Co += 2;
			}
			else
				//cout << i << "\n";
			Co++;
		}
	}
	ret Co;
}
int main(){
vector<ll>V;
cin >> n >> m >> x;
	for (ll i = 1; i<=n; i++){
		for (ll j = 1; j<=m; j++){
			for (ll k = 1;k<=x; k++){
			//	cout << i << " " << j << " " << k <<" " << i*j*k<<" " << "\n";
					up = i*j*k;
						test[up]++;
				}
			}
		}
	for (int i = 1; i <=1000000; i++){
		if (test[i]!=0){
			f = num_div(i);
			f2 += (f*test[i]);
			f2 % 1073741824;
		}
	}	cout << f2 << "\n";
	/*lp(i=1, (n*m*x)+1){
		if (i != 0)
		f = num_div(i);
		cout << f << " ";
	}*/

	//cout << f % 1073741824 << "\n";
		ret 0;
}

#include <bits/stdc++.h>

#define FOR(i, a, b) for(int i = a; i < (int) b; i++)
#define F0R(i, a) FOR (i, 0, a)
#define ROF(i, a, b) for(int i = a; i >= (int) b; i--)
#define R0F(i, a) ROF(i, a, 0)
#define GO(i, a) for (auto i : a)

#define eb emplace_back
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vpii> vvpii;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef vector<pi64> vpi64;

const int MOD = 1073741824;
int dp[1000005];

int get (int n) {
  int tot = 0;
  for (i64 i = 1; i * i <= n; i++) {
    if ((n % i) == 0) {
      tot++;
      if (n / i != i) {
        tot++;
      }
    }
  }
  return tot;
}
int main() {
  int a, b, c, tot = 0;
  scanf ("%d %d %d", &a, &b, &c);
  memset (dp, -1, sizeof(dp));
  FOR (i, 1, a + 1) {
    FOR (j, 1, b + 1) {
      FOR (k, 1, c + 1) {
        if (~dp[i * j *k]) {
          tot += dp[i *j * k];
        } else {
          tot += dp[i *j * k] = get (i * j * k);
          tot %= MOD;
        }
      }
    }
  }
  printf ("%d\n", tot);
  return 0;
}

    #include <cstdio>
    #include <algorithm>
    #define ll long long
    using namespace std;
    int const MAX = 2005;
    int const MOD = 1 << 30;
    int gd[MAX][MAX], mob[MAX], p[MAX];
    bool noprime[MAX];

    void Mobius()
    {
        int pnum = 0;
        mob[1] = 1;
        for(int i = 2; i < MAX; i++)
        {
            if(!noprime[i])
            {
                p[pnum ++] = i;
                mob[i] = -1;
            }
            for(int j = 0; j < pnum && i * p[j] < MAX; j++)
            {
                noprime[i * p[j]] = true;
                if(i % p[j] == 0)
                {
                    mob[i * p[j]] = 0;
                    break;
                }
                mob[i * p[j]] = -mob[i];
            }
        }
    }

    int Gcd(int a, int b)
    {
        if(b == 0)
            return a;
        if(gd[a][b])
            return gd[a][b];
        return gd[a][b] = Gcd(b, a % b);
    }

    ll cal(int d, int x)
    {
        ll ans = 0;
        for(int i = 1; i <= d; i++)
            if(Gcd(i, x) == 1)
                ans += (ll) (d / i);
        return ans;
    }

    int main()
    {
        Mobius();
        int a, b, c;
        ll ans = 0;
        scanf("%d %d %d", &a, &b, &c);
        for(int i = 1; i <= a; i++)
            for(int j = 1; j <= min(b, c); j++)
                if(Gcd(i, j) == 1)
                    ans = (ans % MOD + (ll) (a / i) * mob[j] * cal(b / j, i) * cal(c / j, i) % MOD) % MOD;
        printf("%I64d\n", ans);
    }

#include<stdio.h>
#define jsb 1073741824
using namespace std;
int a,b,c;
int ans[1000005];
int main()
{
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;i<=a*b*c;i++)
    for(int j=i;j<=a*b*c;j+=i)ans[j]++;		//ÎÒÈ¥ÕÒÒò×Ó£¡£¡£¡£¡Ì«Å£ÁËÕâÀï
    int reu=0;
    for(int i=1;i<=a;i++)
    for(int j=1;j<=b;j++)
    for(int k=1;k<=c;k++)
    reu=(reu+ans[i*j*k])%jsb;
    printf("%d\n",reu);
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
int arr[10000005]={};
int fun(int n)
{
    int cnt=0;
    int i=1;
    if(arr[n])
        return arr[n];
    for(;i*i<n;i++)
    {
        if(n%i==0)
            cnt+=2;
    }
    if(i*i==n)
        cnt++;
        arr[n]=cnt;
    return cnt;
}
int main()
{
    int a,b,c,ans=0;
    cin>>a>>b>>c;
    for(int i=1;i<=a;i++)
    {
        for(int j=1;j<=b;j++)
        {
            for(int k=1;k<=c;k++)
            {
                int p=i*j*k;
                 ans+=fun(p);
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}

#include <bits/stdc++.h>

#define rep(i, a, b) for(int i = a; i < b; i++)

using namespace std;

const int maxn = 2001;

int pri[maxn], mu[maxn], tot = 0; bool isp[maxn];
int g[maxn][maxn];

inline int gcd(int a, int b) {
	if(a < b) swap(a, b);
	if(g[a][b]) return g[a][b];
	if(b == 0) return g[a][b] = a;
	else return g[a][b] = gcd(b, a % b);
}

inline void getpri() {
	mu[1] = 1;
	rep(i, 2, maxn) {
		if(!isp[i]) {
			pri[tot++] = i; mu[i] = -1;
		}
		rep(j, 0, tot) {
			if(i * pri[j] >= maxn) break;
			isp[i * pri[j]] = 1;
			if(i % pri[j] == 0) {
				mu[i * pri[j]] = 0; break;
			}
			mu[i * pri[j]] = -mu[i];
		}
	}
}

int main() {
	getpri(); int ans = 0;
	int a, b, c; scanf("%d%d%d", &a, &b, &c);
	if(a > b) swap(a, b); if(a > c) swap(a, c); if(b < c) swap(b, c);
	for(int d = 1; d <= b; d++) if(mu[d] != 0)
		 for(int i = 1; i <= a; i++) if(gcd(d, i) == 1) {
			int u = 0, v = 0;
			for(register int x = 1, y = d; y <= b; x++, y += d) if(gcd(x, i) == 1) u += b / y, v += c / y;
			ans += mu[d] * (a / i) * u * v;
		}
	printf("%d\n", ans & 0x3fffffff);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int N=2020,M=310,B1=12,B2=B1+B1,S=(1<<12)-1,Bitmod=(1<<30)-1;
const long long One=1ll|(1ll<<B1)|(1ll<<B2);
int p[M]={},m=0,a,b,c;
unordered_map<long long,long long> f[M]={};
long long calc(int a,int b,int c,int d)
{
	if(!d) return 1ll;
	if(a<b) swap(a,b);
	if(a<c) swap(a,c);
	if(b<c) swap(b,c);
	long long s=a|(b<<B1)|(((long long)c)<<B2),sum=0;
	if(f[d].count(s))
		return f[d][s];
	for(int x=0,vx=c; vx; ++x,vx/=p[d])
		for(int y=0,vy=b; vy; ++y,vy/=p[d])
			for(int z=0,vz=a; vz; ++z,vz/=p[d])
				sum+=(x+y+z+1)*calc(vx,vy,vz,d-1);
	return f[d][s]=sum&Bitmod;
}
int main()
{
	cin>>a>>b>>c;
	for(int i=2,v=max(a,max(b,c));i<=v;++i)
	{
		bool flag=true;
		for(int j=2;j*j<=i && flag;++j)
			flag&=bool(i%j);
		if(flag)
			p[++m]=i;
	}
	cout<<calc(a,b,c,m)<<endl;
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <numeric>
#include <functional>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <fstream>
using namespace std;

long long gcd(long long a, long long b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

long long gcd2(long long a, long long b, long long& x, long long& y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	long long x1, y1;
	long long d = gcd2(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}
long long lcm(long long  a, long long  b) {
	return a * b / gcd(a, b);
}

int mod = 1000000007;

inline int add(int a, int b) {
	int ret = a + b;
	if (ret >= mod)
		ret -= mod;
	return ret;
}

bool find_any_solution(long long a, long long b, long long c, long long& x0, long long& y0, long long& g) {
	g = gcd2(abs(a), abs(b), x0, y0);
	if (c % g != 0)
		return false;
	x0 *= c / g;
	y0 *= c / g;
	if (a < 0)   x0 *= -1;
	if (b < 0)   y0 *= -1;
	return true;
}

void shift_solution(long long & x, long long & y, long long a, long long b, long long cnt) {
	x += cnt * b;
	y -= cnt * a;
}
const double pi = 3.14159265358979323846;
const int N = 1000001;
int arr[N];
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	for (int i = 1; i < N; ++i) {
		for (int j = i; j < N; j += i) {
			++arr[j];
		}
	}
	int a, b, c, res = 0;
	cin >> a >> b >> c;
	for (int i = 1; i <= a; ++i) {
		for (int j = 1; j <= b; ++j) {
			for (int k = 1; k <= c; ++k) {
				res = (res + arr[i*j*k]) % 1073741824;
			}
		}
	}
	cout << res;
	/*system("pause");*/
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int mod=1073741824;
int cnt[(int)(1e7)], res;
ll solve(ll n)
{
	ll ret=0;
	for(ll i=1; i*i<=n ; i++)
	{
		if (n%i==0)
		{
			ret++;
			if (n/i!=i)
				ret++;
		}
	}
	return ret;
}
int main()
{
	int a,b,c,ans=0;
	cin >> a >> b >> c;
	for (int i=1 ; i<=a ; i++)
		for( int j=1; j<=b ; j++)
			for (int k=1 ; k<=c ; k++)
				cnt[(i*j*k)]++;
	 for ( int i=1 ; i<=int(1e6)+2 ; ++i)
	 {
	     if (cnt[i]) ans=solve(i);
	     ans*=cnt[i];
	     res= ((res%mod)+(ans%mod))%mod;
	 }
	cout << res << endl;
    return 0;
}

#include <iostream>
#include <vector>
using namespace std;

int main(){
    vector<int>p(1000005);
    int a,b,c,res=0;
    cin >> a >> b >> c;
    for(int i=1; i<=1000000; ++i)
        for(int j=i; j<=1000000; j+=i)
            p[j]++;

    for(int i=1; i<=a; ++i)
        for(int j=1; j<=b; ++j)
            for(int k=1; k<=c; ++k)
                res += p[i*j*k];
    cout << res;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int N=2020,M=310,B1=12,B2=B1+B1,S=(1<<12)-1,Bitmod=(1<<30)-1;
const long long One=1ll|(1ll<<B1)|(1ll<<B2);
int p[M]={},m=0;
unordered_map<long long,long long> f[M]={};
long long a,b,c;
void get_prime(int v)
{
	bool d[N]={};
	for(int i=2;i<=v;++i)
	{
		if(!d[i])
			p[++m]=i;
		for(int j=1;j<=m && i*p[j]<=v;++j)
		{
			int t=i*p[j];
			d[t]=true;
			if(i%p[j]==0)
				break;
		}
	}
	reverse(p+1,p+m+1);
}
long long calc(int a,int b,int c,int d)
{
	//if(a<p[d]) a=1;
	//if(b<p[d]) b=1;
	//if(c<p[d]) c=1;
	if(a<b) swap(a,b);
	if(a<c) swap(a,c);
	if(b<c) swap(b,c);
	if(d>m)
		return 1ll;
	long long s=a|(b<<B1)|(((long long)c)<<B2);
	if(f[d].count(s))
		return f[d][s];
	long long sum=0;
	for(int x=0,vx=c; vx; ++x,vx/=p[d])
		for(int y=0,vy=b; vy; ++y,vy/=p[d])
			for(int z=0,vz=a; vz; ++z,vz/=p[d])
				sum+=(x+y+z+1)*calc(vx,vy,vz,d+1);
	return f[d][s]=sum&Bitmod;
}
int main()
{
	cin>>a>>b>>c;
	cerr<<"time="<<clock()<<endl;
	if(a<b) swap(a,b);
	if(a<c) swap(a,c);
	if(b<c) swap(b,c);
	get_prime(a);
	cout<<calc(a,b,c,1)<<endl;
	int ans=0;
	for(int i=1;i<=m;++i)
		ans+=f[i].size();
	cerr<<"m="<<m<<endl;
	cerr<<ans<<endl;
	cerr<<"time="<<clock()<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
inline ll gcd(ll a,ll b)
{
	return b?gcd(b,a%b):a;
}
inline ll lcm(ll x,ll y)
{
	return x*y/__gcd(x,y);
}
int a,b,c,T;
int mu[100010];
bool flag[100010];
vector<int> prime;
void init()
{
	mu[1]=1;
	for(int i=2; i<=100000; i++)
	{
		if(!flag[i])prime.push_back(i),mu[i]=-1;
		for(int j=0; j<prime.size()&&i*prime[j]<=100000; j++)
		{
			flag[i*prime[j]]=1;
			if(i%prime[j])mu[i*prime[j]]=-mu[i];
			else
			{
				mu[i*prime[j]]=0;
				break;
			}
		}
	}
}
ll val[3][100010];
ll ans;
vector<int> con[100010],value[100010];
void init2(int N,int v,int id)
{
	memset(val[id],0,sizeof(val[id]));
	for(int i=1; i<=N; i++)
	{
		for(int j=i; j<=N; j+=i)val[id][i]+=(v/j);
	}
}
int n,deg[100010],vis[100010],book[100010];
int main()
{
	init();
	ans=0;
	scanf("%d%d%d",&a,&b,&c);
	n=max(a,max(b,c));
	fill(deg,deg+n+1,0);
	fill(vis,vis+n+1,0);
	fill(book,book+n+1,0);
	init2(a,a,0);
	init2(b,b,1);
	init2(c,c,2);
	for(int i=1; i<=n; i++)if(mu[i])ans+=mu[i]*val[0][i]*val[1][i]*val[2][i];
	for(int i=1; i<=n; i++)con[i].clear(),value[i].clear();
	for(int g=1; g<=n; g++)
	{
		if(!mu[g])continue;
		for(int i=1; i*g<=n; i++)
		{
			int I=i*g;
			if(!mu[I])continue;
			for(int j=i+1; 1ll*i*j*g<=n; j++)
			{
				if(!mu[j*g])continue;
				if(__gcd(i,j)==1)
				{
					++deg[i*g];
					++deg[j*g];
					int J=j*g,L=i*j*g;
					ans+=mu[I]*(val[0][J]*val[1][L]*val[2][L]+val[0][L]*val[1][J]*val[2][L]+val[0][L]*val[1][L]*val[2][J])+mu[J]*(val[0][I]*val[1][L]*val[2][L]+val[0][L]*val[1][I]*val[2][L]+val[0][L]*val[1][L]*val[2][I]);
				}
			}
		}
	}
	for(int g=1; g<=n; g++)
	{
		if(!mu[g])continue;
		for(int i=1; i*g<=n; i++)
		{
			if(!mu[i*g])continue;
			for(int j=i+1; 1ll*i*j*g<=n; j++)
			{
				if(!mu[j*g])continue;
				if(__gcd(i,j)==1)
				{
					if(deg[i*g]>deg[j*g])con[i*g].push_back(j*g),value[i*g].push_back(i*j*g);
					else con[j*g].push_back(i*g),value[j*g].push_back(i*j*g);
				}
			}
		}
	}
	for(int i=1; i<=n; i++)
	{
		if(!mu[i])continue;
		for(int t1=0; t1<con[i].size(); t1++)
		{
			int j=con[i][t1];
			vis[j]=i;
			book[j]=value[i][t1];
		}
		for(int t1=0; t1<con[i].size(); t1++)
		{
			int j=con[i][t1],A=value[i][t1];
			for(int t2=0; t2<con[j].size(); t2++)
			{
				int k=con[j][t2];
				if(vis[k]!=i)continue;
				int B=value[j][t2],C=book[k];
				ans+=mu[i]*mu[j]*mu[k]*(val[0][A]*val[1][B]*val[2][C]+val[0][A]*val[1][C]*val[2][B]+val[0][B]*val[1][A]*val[2][C]+val[0][C]*val[1][B]*val[2][A]+val[0][B]*val[1][C]*val[2][A]+val[0][C]*val[1][A]*val[2][B]);
			}
		}
	}
	printf("%lld\n",ans%1073741824);
	return 0;
}

//CF235E
//by Cydiater
//2017.2.22
#include <iostream>
#include <queue>
#include <map>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <iomanip>
#include <algorithm>
#include <bitset>
#include <set>
#include <vector>
#include <complex>
using namespace std;
#define ll int
#define up(i,j,n)	for(ll i=j;i<=n;i++)
#define down(i,j,n)	for(ll i=j;i>=n;i--)
#define cmax(a,b)	a=max(a,b)
#define cmin(a,b)	a=min(a,b)
const ll MAXN=4e6+5;
const ll mod=1073741824;
inline ll read(){
	char ch=getchar();ll x=0,f=1;
	while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
ll A,B,C,AB,prime[MAXN],P[MAXN],S[MAXN],f[MAXN],Q[MAXN],miu[MAXN],cnt;
bool vis[MAXN];
namespace solution{
	void Prepare(){
		A=read();B=read();C=read();AB=A*B;
		miu[1]=1;
		up(i,2,C){
			if(!vis[i]){prime[++cnt]=i;miu[i]=-1;}
			up(j,1,cnt){
				if(i*prime[j]>C)break;
				vis[i*prime[j]]=1;
				if(i%prime[j])miu[i*prime[j]]=-miu[i];
				else break;
			}
		}
		up(i,1,A)up(j,1,B)f[i*j]++;
		up(i,1,AB)for(ll j=i;j<=AB;j+=i)
			(S[i]+=f[j])%=mod;
		up(i,1,AB)for(ll j=i;j<=AB;j+=i)
			(P[i]+=S[j])%=mod;
		ll pos;
		up(i,1,C){
			for(ll j=1;j<=i;j=pos+1){
				pos=i/(i/j);
				Q[i]+=(pos-j+1)*(i/j);
				(Q[i]+=mod)%=mod;
			}
		}
	}
	void Solve(){
		ll ans=0;
		up(i,1,C){
			(ans+=miu[i]*P[i]*Q[C/i])%=mod;
			(ans+=mod)%=mod;
		}
		cout<<ans<<endl;
	}
}
int main(){
	//freopen("input.in","r",stdin);
	using namespace solution;
	Prepare();
	Solve();
	//cout<<"Time has passed:"<<1.0*clock()/1000<<"s!"<<endl;
	return 0;
}

#include <algorithm>
#include <numeric>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <cmath>
#include <complex>
#include <stack>
#include <string>
#include <cstring>
#include "time.h"
using namespace std;
#define SZ(x) (int)x.size()
#define FOR(i,x,y) for(int i=(int)(x);i<=(int)(y);++i)
#define REP(i,n) FOR(i,0,n-1)
#define FORD(i,x,y) for(int i=(int)(x);i>=(int)(y);--i)
#define ALL(a) (a).begin(),(a).end()
#define FORE(i,t) for(i=t.begin();i!=t.end();++i)
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef deque<int> DI;
typedef deque<string> DS;
typedef long long i64;
#define PI 3.14159265358979323
#define DEGTORAD(x) (double)x * 3.14159265358979323846264338327950288 / 180.0
#define RADTODEG(x) (double)x * 180 / 3.14159265358979323846264338327950288
#define prt if(1)printf
typedef pair< int, int > PII;
template <typename T> string tostr(const T& t) { ostringstream os; os<<t; return os.str(); }
#define ARRTOV(a,v) (v.assign(a,a+sizeof(a)/sizeof(a[0])))
#define SAFEMOD(a,b) (((a%b)+b)%b)
#define SQR(x) ((x)*(x))
#define EPS 1e-9
#define POW(x,y) pow((double)(x),(double)(y))

i64 memo[110][110][110];
int A,B,C;
int MOD = 1073741824;
map< int, int > cache;

int countFactors(int n) {
  if (cache.count(n))
    return cache[n];
  set< int > s;
  for(int i = 1; i*i <= n; ++i) {
    if ( (n%i) == 0) {
      s.insert(i);
      s.insert(n/i);
    }
  }
  return cache[n] = SZ(s);
}

int main() {
#ifndef ONLINE_JUDGE
  freopen("146_B.in","r", stdin);
#endif
  cin>>A>>B>>C;

  int ans = 0;
  FOR(i,1,A) {
    FOR(j,1,B) {
      FOR(k,1,C) {
        ans = (ans + countFactors(i*j*k))%MOD;
      }
    }
  }
  cout<<ans<<endl;

  return 0;
}

#include"stdio.h"
#include"string.h"
#include"stdlib.h"
#include"math.h"
int num[1000111];
int main()
{
    int a,b,c;
    int i,l,j;
    int t,temp;
    int ans;

    memset(num,0,sizeof(num));
    for(i=1;i<=1000000;i++)
    for(temp=i;temp<=1000000;temp+=i)   num[temp]++;

    scanf("%d%d%d",&a,&b,&c);
    ans=0;
    for(i=1;i<=a;i++)
    {
        for(l=1;l<=b;l++)
        {
            for(j=1;j<=c;j++)
            {
                temp=i*l*j;
                ans+=num[temp];
                ans%=1073741824;
            }
        }
    }
    printf("%d\n",ans);

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=2003;
const ll mod=1073741824;
int f[maxn+10][maxn+10],vis[maxn+10],prim[maxn+10],mu[maxn+10];
int gcd(int a,int b)
{
    if (b==0) return a;
    return gcd(b,a%b);
}
void init(int n)
{
    int i,j,cnt2;
    mu[1]=1;
    cnt2=0;
    memset(vis,0,sizeof(vis));
    for(i=2;i<=n;i++)
    {
        if(!vis[i]){mu[i]=-1;prim[++cnt2]=i;}
        for(j=1;j<=cnt2&&i*prim[j]<=n;j++)
        {
            vis[i*prim[j]]=1;
            if(i%prim[j]==0)break;
            else mu[i*prim[j]]=-mu[i];
        }
    }
    for (i=1;i<=maxn;i++) {
        for (j=i;j<=maxn;j++) {
            f[i][j]=f[j][i]=gcd(i,j);
        }
    }
}
ll calc(int n,int d,int p)
{
    ll ret;
    int i;
    ret=0;
    for (i=1;i<=n;i++) {
        if (f[i*d][p]==1) {
            ret=(ret+1LL*n/i);
        }
    }
    return ret;
}
int main()
{
    //freopen("text.in","r",stdin);
    int a,b,c,z,d;
    ll ans;
    init(2003);
    scanf("%d%d%d",&a,&b,&c);
    ans=0;
    for (z=1;z<=c;z++) {
        for (d=1;d<=min(a,b);d++) {
            ans+=(c/z)*mu[d]*calc(a/d,d,z)%mod*calc(b/d,d,z)%mod;
            ans=(ans+mod)%mod;
        }
    }
    printf("%I64d\n",ans);
    return 0;
}

#include <iostream>
#include <map>
#include <cmath>
#include <set>
using namespace std;

int vis[int(1e6+5)]={0};
int val[int(1e6+5)];
int calc(int n)
{
    int cnt=0;
    for(int i=1;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {
            if((n/i)==i) cnt+=1;
            else
                cnt+=2;
        }
    }
    val[n]=cnt;
    vis[n]=1;
    return cnt;
}
int main()
{
std::ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
set<int> st;
int t=1073741824 ;
int ans=0;
for(int i=1;i<=a;i++)
{
    for(int j=1;j<=b;j++)
    {
        for(int k=1;k<=c;k++)
            {
                if(vis[i*j*k])
                    ans+=val[i*j*k];
                else
               ans+=calc(i*j*k);
               ans%=t;
                }

    }
}

cout<<ans<<endl;
	return 0;
}

#include<iostream>
#include<vector>
#include<unordered_map>
#include<map>
#include<string>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<math.h>
#include<algorithm>

using namespace std;

int nu_f[1000001]={0};
void Num_Factors()
{
	for (long long i=1 ; i<1000001;i++)
	{
	    for (long long j=i; j<1000001;j+=i)
	    {
	        nu_f[j]++;
	    }
	}
}

int main()
{

	int n, m, c;
	Num_Factors();
	cin >> n >> m >> c;
	long long res = 0;
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= m; j++)
		{
			for (int k = 1; k <= c; k++)
			{
				res += nu_f[i*j*k];
				res%=1073741824;
			}
		}
	}
	cout << res;
	cout << endl;
//	system("pause");
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1073741824
typedef pair<int, int> pii;
int dp[1000001];
int pilinha(int a){

  int i,total=0;
  for(i=1;i*i<=a;i++){
    if(a%i==0){
      total+=2;
    }
  }
if((i-1)*(i-1)==a){total--;}
return total;
}

int main(){
int a,b,c,h,k,i,ans=0;
scanf("%d%d%d",&a,&b,&c);
for(i=1;i<=a;i++){
  for(k=1;k<=b;k++){
    for(h=1;h<=c;h++){

      if(dp[i*k*h]){ ans+=dp[i*k*h]; //cout << "73"<<endl;
     }else{
       dp[i*k*h]=pilinha(i*k*h); ans+=dp[i*k*h]; ans%=MOD;
     }

//cout << i<<" "<<k<<" "<<h<<" "<<get(i*k*h)<<endl;
    }
  }
}

printf("%d",ans);

}

#include<bits/stdc++.h>
using namespace std;
void IO()
{
    ios::sync_with_stdio(0);
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
}
int d(int n);
int main()
{
    IO();
    short int a,b,c;
    unsigned long long sum=0;
    long long *arr=(long long*)calloc(1000500,sizeof(long long));
    for (long long i=1;i<=1000000;i++)
    {
        for (long long j=i;j<=1000000;j=j+i)
        {
            arr[j]++;
        }
    }
    cin>>a>>b>>c;
    for (short int i=1;i<=a;i++)
    {
        for (short int j=1;j<=b;j++)
        {
            for (short int k=1;k<=c;k++)
            {
                sum+=arr[i*j*k]%1073741824;
            }
        }
    }
    cout<<sum<<endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
int unx(){int x=0,n=0; char c=getchar(); for(;!isdigit(c);c=getchar()) n=(c=='-'); for(;isdigit(c);c=getchar())x=x*10+c-'0'; return (n)?-x:x;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int l,int r){return l+rng()%(r-l+1);}
#define in unx()
#define fasty ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define forinc(a,b,c) for(int a=b, _c=c; a<=_c; ++a)
#define fordec(a,b,c) for(int a=b, _c=c; a>=_c; --a)
#define forv(a,b) for(auto &a:b)
#define ii pair<int,int>
#define iii pair<int,ii>
#define fi first
#define se second
#define pb push_back
#define all(a) a.begin(),a.end()
#define reset(f, x) memset(f, x, sizeof(f))
#define mt make_tuple
#define bit(x,i) (x>>(i-1)&1ll)
#define onbit(x,i) (x|(1ll<<(i-1)))
#define offbit(x,i) (x&~(1ll<<(i-1)))
#define task "number"

const int N=2005;
const long long mod=1073741824;
int n,a,b,c;
int p[N][N],e[N],nt[N],cnt;
map<int,int> f[N][N];
int F(int i,int x,int y,int z){
	if(!i) return 1;
	vector<int> u={x,y,z}; sort(all(u), greater<int>());
	x=u[0], y=u[1], z=u[2];
	if(f[i][x].find(y*2001+z)!=f[i][x].end()) return f[i][x][y*2001+z];
	int ans=0;
	for(int _x=0; p[i][_x]<=x; ++_x){
		for(int _y=0; p[i][_y]<=y; ++_y){
			for(int _z=0; p[i][_z]<=z; ++_z){
				ans=(ans+F(i-1, x/p[i][_x], y/p[i][_y], z/p[i][_z])*(_x+_y+_z+1)%mod)%mod;
			}
		}
	}
	return f[i][x][y*2001+z]=ans;
}
main(){
	fasty;
	if(fopen(task".inp","r")){
		freopen(task".inp","r",stdin);
	}

	forinc(i,2,2000) e[i]=1;
	forinc(i,2,2000){
		if(e[i]) for(int j=i; j*i<=2000;j++) e[j*i]=0;
	}
	forinc(i,2,2000){
		if(e[i]){
			nt[++cnt]=i;
			p[cnt][0]=1;
			forinc(j,1,2000){
				p[cnt][j]=p[cnt][j-1]*i;
				if(p[cnt][j]>2000) break;
			}
		}
	}
	a=in, b=in, c=in;
	cout<<F(cnt,a,b,c);
}

#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
#include<cstring>
#include<cstdlib>
#include<set>
#include<stack>
#include<cctype>
#include<map>
#include<ctime>
#include<algorithm>
using namespace std;
#define ll __int64
//#define ll long long int
const int inf=1000000000;
const int mod=1073741824;
const int N=100005;
const double pi=acos(-1.0);
const double eps=1e-9;
template<class T> inline T fmin(T a,T b){   return a<b?a:b;  }
template<class T> inline T fmax(T a,T b){   return a>b?a:b;  }
template<class T> inline void swap(T &x,T &y){  T t;t=x,x=y,y=t; }

const int MAXn=1000005;
int w[6600];
int ans[MAXn],n;
//判断n是否是质数
bool isprime(int n)
{
    int i;
    if(n<=1) return false;
    if(n==2) return true;
    if(n%2==0) return false;
    for(i=3;i*i<=n;i+=2)
        if(n%i==0) return false;
    return true;
}
//计算n的因子个数
int count(int n)
{
    if(ans[n]!=-1) return ans[n];
    int a=n,i=0,sum=1;
    while(a!=1&&i<n)
    {
        int cnt=0;
        while(a%w[i]==0)
        {
            cnt++;
            a/=w[i];
        }
        if(cnt)
            sum*=(1+cnt);
        i++;
    }
    ans[n]=sum;
    return ans[n];
}

int main()
{

    int i,j,k,cnt,sum,p=1;
    int a,b,c;
    n=0;
    for(i=1;i<(1<<16);i++)
        if(isprime(i))
            w[n++]=i;
    memset(ans,-1,sizeof(ans));
    while(cin>>a>>b>>c)
    {
        int sum=0;
        for(i=1;i<=a;i++)
            for(j=1;j<=b;j++)
                for(k=1;k<=c;k++)
                    sum+=count(i*j*k),sum=sum%mod;
        printf("%d\n",sum);
    }
    return 0;
}

/*痛みを受け取れ，痛みを知れ*/
#include<bits/stdc++.h>
#define f(i,a,b) for(register int i=a;i<=b;++i)
#define ff(i,a,b) for(register int i=a;i>=b;--i)
#define debug(x) cerr << #x << " : " << x << " " << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
const ll mod = 1000007;
const int inf = 0x3f3f3f3f;
const double tiaohe = 0.57721566490153286060651209;
ll oula(ll x) { ll res = x;f(i, 2, x / i) { if (x % i == 0) { res = res / i * (i - 1);while (x % i == 0) x /= i; } }if (x > 1) res = res / x * (x - 1);return res; }
ll quickmod(ll a, ll n, ll m) { ll s = 1;while (n) { if (n & 1) { s = s * a % m; }a = (a*a) % m;n = n / 2; }return s; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
void ex_gcd(ll a, ll b, ll &x, ll &y, ll &d) { if (!b) { d = a, x = 1, y = 0; } else { ex_gcd(b, a % b, y, x, d);y -= x * (a / b); } }
ll inv(ll t, ll p) { ll d, x, y;ex_gcd(t, p, x, y, d);return d == 1 ? (x % p + p) % p : -1; }
bool isPrime(ll x) { if (x == 2)return true;if (x % 2 == 0)return false;for (ll i = 2;i*i <= x;i++) if (x % i == 0)return false; return true; }
//double a = log(n) +tiaohe + 1.0 / (2 * n);
double eqa = (1 + sqrt(5.0)) / 2.0;
const int N = 2e3+5;
ll mo = 1ll<< 30;
int p[N + 1], mob[N + 1], cnt,d[N][N];
bool vis[N + 1];
void x_x()
{
	mob[1] = 1;
	f(i, 2, N)
	{
		if (!vis[i])
		{
			p[++cnt] = i;
			mob[i] = -1;
		}
		for (int j = 1;p[j] <= N / i;j++)
		{
			vis[p[j] * i] = true;
			if (i%p[j] == 0)
			{
				mob[p[j] * i] = 0;
				break;
			}
			mob[p[j] * i] = -mob[i];
		}
	}
}
int GCD(int a, int b)
{
	if (d[a][b])return d[a][b];
	return b ?d[a][b]= GCD(b, a%b) : a;
}
ll cal(int i, int top)
{
	ll res = 0;
	f(j, 1, top)
		if (GCD(i, j) == 1)res = (res + top / j) % mo;
	return res;
}
int main()
{
	//freopen("in.txt", "r", stdin);
	x_x();
	int a, b, c;
	while (cin >> a >> b >> c)
	{
		ll ans = 0;
		f(i, 1, a)
		f(j, 1, min(b, c))
		if (GCD(i, j) == 1)
		{
			ll tmp = (ll)(a / i)*mob[j] * cal(i, b / j) % mo*cal(i, c / j) % mo;
			ans = (ans + tmp) % mo;
		}
		cout << ans << endl;
	}
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

const int N = 1e6+111;

int n,a,b,c,cnt,ans=0,Prime[N];
bool F[N];

int findDiv(int x){
    int re = 1;
    int tmp = x;
    for(int i = 1; Prime[i]*Prime[i]<=x; i++){
        int a = 0;
        while(tmp%Prime[i]==0){
            a++;
            tmp/=Prime[i];
        }
        re *= a+1;
    }
    if(tmp>1) re*=2;
    return re;
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    memset(F,1,sizeof(F));
    F[0] = F[1] = 0;
    for(int i = 2; i < N; ++i){
        if(F[i]){
            for(int j = 2; i*j < N; ++j){
                F[i*j] = 0;
            }
        }
    }
    cnt = 0;
    for(int i = 2; i < N; i++){
        if(F[i]){
            cnt++;
            Prime[cnt] = i;
        }
    }
    cin>>a>>b>>c;
    for(int i=1;i<=a;i++)
        for(int j=1;j<=b;j++)
            for(int k=1;k<=c;k++)
                ans=(ans+findDiv(i*j*k)%1073741824)%1073741824;
    cout <<ans;
    return 0;
}

#include<cstdio>
#include<iostream>

using namespace std;
typedef long long LL;
int A[1000009];

int main()
{
	int i,j,k;
	for(i=1;i<1001 ; i++)
    {
		A[i*i] ++ ;
	for(j = i*i + i ; j<=1000007  ; j+=i)
		A[j]+=2;
	}
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	LL ans=0;
	for(i=1; i <= a; i++)
	for(j = 1 ; j <= b ; j++)
	for(k=1 ; k <= c ; k++)
		ans += A[i*j*k];
	cout << ans % 1073741824 << endl;
}

#include <bits/stdc++.h>
#define mod 1073741824
#define moo 1073741823
using namespace std;
const int n=2000;
int miu[2005],pri[2005],deg[2005],cnt=0,num=0;
int f1[2005],f2[2005],f3[2005],gu[2005];
int p[2005],id[2005],co[2005];
int vis[2005];
bool isp[2005];
vector <int> vec[2005];
vector <int> val[2005];
struct edge
{int a,b,val;
}e[10005];
inline bool cmp(int a,int b)
{return deg[a]<deg[b];}
inline int gcd(int a,int b)
{while (a%b) a%=b,swap(a,b);
return b;
}
inline int mul(int a,int b,int c)
{if ((!a)||(!b)||(!c)) return 0;
if (b^1) a=1ll*a*b%mod;
if (c^1) a=1ll*a*c%mod;
return a;
}
inline void getp()
{miu[1]=1;
for (int i=2;i<=n;i++)
{if (!isp[i]) {miu[i]=-1;pri[++cnt]=i;}
for (int j=1;j<=cnt&&i*pri[j]<=n;j++)
{isp[i*pri[j]]=1;
miu[i*pri[j]]=-miu[i];
if (i%pri[j]==0) {miu[i*pri[j]]=0;break;}
}
}
}
int main (){
	int i,j,k;getp();
	for (i=1;i*i<=n;i++)
	{if (!miu[i]) continue;
	for (j=i;i*j<=n;j++)
	{if (!miu[j]) continue;
	if (gcd(i,j)!=1) continue;
	for (k=1;i*j*k<=n;k++)
	{if ((!miu[i*k])||(!miu[j*k])) continue;
	e[++num].a=i*k;deg[i*k]++;
	e[num].b=j*k;deg[j*k]++;
	e[num].val=i*j*k;
	}
	}
	}
	for (i=1;i<=n;i++) p[i]=i;
	sort(p+1,p+n+1,cmp);
	for (i=1;i<=n;i++) id[p[i]]=i;
	memset(deg,0,sizeof(deg));
	for (i=1;i<=num;i++)
	{if (id[e[i].a]>id[e[i].b]) swap(e[i].a,e[i].b);
	deg[e[i].a]++;
	}
	for (i=1;i<=n;i++)
	{vec[i].resize(deg[i]);
	val[i].resize(deg[i]);
	}
	for (i=1;i<=num;i++)
	{vec[e[i].a][co[e[i].a]]=e[i].b;
	val[e[i].a][co[e[i].a]]=e[i].val;
	co[e[i].a]++;
	}
	int test,a,b,c;
	//scanf ("%d",&test);
	test=1;
	while (test--)
	{int ans=0,maxn,maxx;
	scanf ("%d%d%d",&a,&b,&c);
	maxx=max(max(a,b),c);
	maxn=a+b+c-maxx-min(min(a,b),c);
	for (i=1;i<=a;i++)
	{for (j=i;j<=a;j+=i) f1[i]+=(a/j);
	}
	for (i=1;i<=b;i++)
	{for (j=i;j<=b;j+=i) f2[i]+=(b/j);
	}
	for (i=1;i<=c;i++)
	{for (j=i;j<=c;j+=i) f3[i]+=(c/j);
	}
	for (i=1;i<=maxn;i++)
	{int t1=i,t2,t3;
	for (j=0;j<deg[i];j++)
	{if (vec[i][j]>maxn) continue;
	if (val[i][j]>maxx) continue;
	vis[vec[i][j]]=i;
	gu[vec[i][j]]=val[i][j];
	}
	for (j=0;j<deg[i];j++)
	{t2=vec[i][j];
	if (t2>maxn) continue;
	if (val[i][j]>maxx) continue;
	for (k=0;k<deg[t2];k++)
	{t3=vec[t2][k];
	if (t3>maxn) continue;
	if (vis[t3]!=i) continue;
	if (val[t2][k]>maxx) continue;
	int k1=val[i][j],k2=gu[t3],k3=val[t2][k],p1=t1,p2=t2,p3=t3;
	if (p1==p3) swap(p2,p3),swap(k1,k2);
	if (p2==p3) swap(p1,p3),swap(k1,k3);
	int o=miu[p1]*miu[p2]*miu[p3],res=0;
	if (p1==p2&&p2==p3) res=mul(f1[k1],f2[k2],f3[k3]);
	if (p1==p2&&p2!=p3)
	{res+=mul(f1[k1],f2[k2],f3[k3]);res&=moo;
	res+=mul(f1[k2],f2[k1],f3[k3]);res&=moo;
	res+=mul(f1[k2],f2[k3],f3[k1]);res&=moo;
	}
	if (p1!=p2&&p2!=p3)
	{res+=mul(f1[k1],f2[k2],f3[k3]);res&=moo;
	res+=mul(f1[k1],f2[k3],f3[k2]);res&=moo;
	res+=mul(f1[k2],f2[k1],f3[k3]);res&=moo;
	res+=mul(f1[k2],f2[k3],f3[k1]);res&=moo;
	res+=mul(f1[k3],f2[k1],f3[k2]);res&=moo;
	res+=mul(f1[k3],f2[k2],f3[k1]);res&=moo;
	}
	if (o==1) {ans=(ans+res>=mod?ans+res-mod:ans+res);}
	else {ans=(ans-res<0?ans-res+mod:ans-res);}
	}
	}
	}
	printf ("%d\n",ans);
	}
	return 0;
}

//In the Name of Allah
//Written By Mo'men AbdelRazek
#include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;

int T;
int x[1000001];
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.in", "r", stdin);
    #endif

	int mod = 1<<30;
	int ans = 0;
	int a,b,c,z;
	cin>>a>>b>>c;
	for(int i=1;i<=1000000;i++)
	{
		for(int j=i;j<=1000000;j+=i)x[j]++;
	}
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
			{ans+=x[i*j*k];}
	//cout<<mod<<endl;
	cout<<ans%mod<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
/*
██╗    ██╗██████╗ ██╗████████╗████████╗███████╗███╗   ██╗    ██████╗ ██╗   ██╗
██║    ██║██╔══██╗██║╚══██╔══╝╚══██╔══╝██╔════╝████╗  ██║    ██╔══██╗╚██╗ ██╔╝
██║ █╗ ██║██████╔╝██║   ██║      ██║   █████╗  ██╔██╗ ██║    ██████╔╝ ╚████╔╝
██║███╗██║██╔══██╗██║   ██║      ██║   ██╔══╝  ██║╚██╗██║    ██╔══██╗  ╚██╔╝
╚███╔███╔╝██║  ██║██║   ██║      ██║   ███████╗██║ ╚████║    ██████╔╝   ██║
 ╚══╝╚══╝ ╚═╝  ╚═╝╚═╝   ╚═╝      ╚═╝   ╚══════╝╚═╝  ╚═══╝    ╚═════╝    ╚═╝

     ███╗   ███╗   ██╗██████╗ ██████╗  █████╗ ██╗  ██╗██╗███╗   ███╗
     ████╗ ████║   ██║██╔══██╗██╔══██╗██╔══██╗██║  ██║██║████╗ ████║
     ██╔████╔██║   ██║██████╔╝██████╔╝███████║███████║██║██╔████╔██║
     ██║╚██╔╝██║   ██║██╔══██╗██╔══██╗██╔══██║██╔══██║██║██║╚██╔╝██║
     ██║ ╚═╝ ██║██╗██║██████╔╝██║  ██║██║  ██║██║  ██║██║██║ ╚═╝ ██║
     ╚═╝     ╚═╝╚═╝╚═╝╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚═╝     ╚═╝
*/
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define FOR(n) for(int i=1;i<=n;i++)
#define E endl
#define PP pair<ll,ll>
const int MOD=1e9+7;
typedef long long int ll;
typedef unsigned long long int ull;

vector<long>arr(1234567);

int div(long long n)
{
    //long long square_root = (long long ) sqrt(n) + 1;
            int cou=0;

    for (int h = 1; h*h <= n ; h++) {

    if (n % h == 0&&h*h!=n)
       cou+=2;
    else if (n % h == 0&&h*h==n)
       cou+=1;
    }
    return cou;
}
int main(){speed;
ll a,b,c,sum=0,M=10737418241; cin>>a>>b>>c;
for(int i=1;i<=a;i++)   for(int j=1;j<=b;j++)   for(int k=1;k<=c;k++)
{
    if(arr[i*j*k]<=0)arr[i*j*k]=div(i*j*k),sum+=arr[i*j*k];
    else sum+=arr[i*k*j];
    if(sum>=M)sum%=M;
}
cout<<sum;
return 0;}

#include<iostream>
#include<vector>
using namespace std;
int count_div(int n){
    int tot = 1 ;
    for(int i = 2 ; i * i <= n ; i++){
        if(n % i == 0){
            int cnt = 0 ;
            while(n % i == 0){
                n /= i ;
                cnt++;
            }
            tot *= (cnt+1);
        }
    }

    if(n != 1){
        tot *= 2 ;
    }

    return tot;
}
int vec[1000001];
void divisor(int n)
{
    for(int j=1;j<=n;j++)
    {
        int k=j;
        int tot = 1 ;
        for(int i = 2 ; i * i <= k ; i++)
        {
            if(k % i == 0)
            {
                int cnt = 0 ;
                while(k % i == 0)
                {
                    k /= i ;
                    cnt++;
                }
            tot *= (cnt+1);
            }
        }
        if(k != 1)
        {
                tot *= 2 ;
        }
        vec[j]=tot;
    }
}
int main()
{
    divisor(1000000);
    int a=1,b=1,c=1,a1,b1,c1,k;
    long long k1=0;
    cin>>a1>>b1>>c1;
    for(;;a++)
    {
        for(;;b++)
        {
            for(;;c++)
            {
                k=a*b*c;
                k1+=vec[k];
                if(c==c1)
                {
                    c=1;
                    break;
                }
            }
            if(b==b1)
            {
                b=1;
                break;
            }
        }
        if(a==a1)
        {
            break;
        }
    }
    cout<<k1%1073741824;
}

#include <bits/stdc++.h>

using namespace std;

const int MOD = 1073741824  ;
long long sol[1000001];

long long d(long long a) {
	if (sol[a] != 0) {
		return sol[a];
	}
	int i, c = 0;
	for (i = 1; i * i <= a; i++) {
		if (a % i == 0) {
			if (i * i != a) {
				c++;
			}
			c++;
		}
	}
	sol[a] = c;
	return c;
}

int main() {
	long long i, j, k, a, b, c, ans;
	cin >> a >> b >> c;
	ans = 0;
	for (i = 1; i <= a; i++)
		for (j = 1; j <= b; j++)
			for (k = 1; k <= c; k++)
				ans += d(i * j * k);

	cout << ans % MOD ;
}

#include <bits/stdc++.h>
#define ll long long
#define ysf (1<<30)
#define N (2005)

using namespace std;

struct edge{ int u,v,w; }e[100*N];
struct data{ int x,y; };
vector<data> g[N];

int fa[N],fb[N],fc[N],d[N],st[25];
int prime[N],vis[N],mu[N],pr[N];
int A,B,C,lim,cnt,tot,top;
ll res,ans;

inline void pre(){
  pr[1]=mu[1]=1;
  for (int i=2;i<=lim;++i){
    if (!vis[i]) prime[++cnt]=i,pr[i]=i,mu[i]=-1;
    for (int j=1,k;j<=cnt;++j){
      k=i*prime[j]; if (k>lim) break;
      vis[k]=1,pr[k]=prime[j];
      if (i%prime[j]) mu[k]=-mu[i]; else break;
    }
  }
  return;
}

inline void dfs(int x,int v1,int v2,int val){
  if (x>top){
    if (v1>=v2) return;
    e[++tot]=(edge){v1,v2,val};
    ++d[v1],++d[v2]; return;
  }
  dfs(x+1,v1*st[x],v2,val),dfs(x+1,v1,v2*st[x],val);
  dfs(x+1,v1*st[x],v2*st[x],val); return;
}

int main(){
#ifndef ONLINE_JUDGE
  freopen("divsum.in","r",stdin);
  freopen("divsum.out","w",stdout);
#endif
cin>>A>>B>>C,lim=max(A,max(B,C)),pre(),ans=tot=0;
  for (int i=1;i<=lim;++i){
    fa[i]=fb[i]=fc[i]=vis[i]=d[i]=0,g[i].clear();
    for (int j=i;j<=lim;j+=i) fa[i]+=A/j,fb[i]+=B/j,fc[i]+=C/j;
  }
  for (int i=1,x;i<=lim;++i){
    if (!mu[i]) continue; top=0,x=i;
    while (x!=1) st[++top]=pr[x],x/=pr[x]; dfs(1,1,1,i);
  }
  for (int i=1;i<=tot;++i){
    if (d[e[i].u]<d[e[i].v]) swap(e[i].u,e[i].v);
    g[e[i].u].push_back((data){e[i].v,e[i].w});
  }
  for (int a=1,la;la=g[a].size(),a<=lim;++a){
    for (int i=0;i<la;++i) vis[g[a][i].x]=g[a][i].y;
    for (int i=0,lb,b,v1;i<la;++i){
      b=g[a][i].x,v1=g[a][i].y,lb=g[b].size();
      for (int j=0,c,v2,v3,fg;j<lb;++j){
	c=g[b][j].x,v2=g[b][j].y;
	if (!(v3=vis[c])) continue; fg=mu[a]*mu[b]*mu[c];
	res=1LL*fa[v1]*(1LL*fb[v2]*fc[v3]+1LL*fb[v3]*fc[v2]);
	res+=1LL*fa[v2]*(1LL*fb[v1]*fc[v3]+1LL*fb[v3]*fc[v1]);
	res+=1LL*fa[v3]*(1LL*fb[v1]*fc[v2]+1LL*fb[v2]*fc[v1]);
	ans+=fg==1?res:-res;
      }
    }
    for (int i=0;i<la;++i) vis[g[a][i].x]=0;
  }
  for (int i=1,a,b,v,fg;i<=tot;++i){
    a=e[i].u,b=e[i].v,v=e[i].w,fg=mu[a]*mu[a]*mu[b];
    res=1LL*fa[v]*fb[v]*fc[a]+1LL*fa[v]*fb[a]*fc[v]+1LL*fa[a]*fb[v]*fc[v];
    ans+=fg==1?res:-res,fg=mu[a]*mu[b]*mu[b];
    res=1LL*fa[v]*fb[v]*fc[b]+1LL*fa[v]*fb[b]*fc[v]+1LL*fa[b]*fb[v]*fc[v];
    ans+=fg==1?res:-res;
  }
  for (int i=1;i<=lim;++i) if (mu[i]) ans+=1LL*mu[i]*fa[i]*fb[i]*fc[i];
  printf("%lld\n",ans%ysf); return 0;
}

#include<bits/stdc++.h>
#define N 2000
#define ll long long
using namespace std;
const int mod=1073741824;
int prim[N+10],cnt,mu[N+10],sum[N+10];
bool vis[N+10],s[N+10][N+10];
void init() {
	mu[1]=1;
	for(int i=2; i<=N; i++) {
		if(!vis[i])prim[++cnt]=i,mu[i]=-1;
		for(int j=1; j<=cnt&&i*prim[j]<=N; j++) {
			vis[i*prim[j]]=1;
			if(i%prim[j]==0) {
				mu[i*prim[j]]=0;
				break;
			} else mu[i*prim[j]]=-mu[i];
		}
	}
	for(int i=1;i<=N;i++)for(int j=1;j<=N;j++)if(__gcd(i,j)==1)s[i][j]=1;
}
int main() {
	init();
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(b>c)swap(b,c);
	if(a>b)swap(a,b);
	if(b>c)swap(b,c);
	ll ans=0;
	for(int i=1; i<=a; i++) {
		for(int d=1; d<=b; d++) {
			if(!s[i][d])continue;
			int l1=b/d,l2=c/d,sum1=0,sum2=0;
			for(int k=1; k<=l1; k++)if(s[i][k])sum1+=l1/k;
			for(int k=1; k<=l2; k++)if(s[i][k])sum2+=l2/k;
			ans=(ans+(ll)(a/i)*mu[d]*(ll)(sum1*sum2)%mod)%mod;
		}
	}
	printf("%lld\n",(ans+mod)%mod);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int d(int ind)
{
	int c=0;
	for(int i=1; i<=sqrt(ind); i++)
	{
		if(ind%i==0)
		{
			if(i*i==ind)c++;
			else c+=2;
		}
	}
	return c;
}
int main()
{
	int a , b , c;
	map<int , int>mp;
	cin>>a>>b>>c;
	long long ans=0 , mod=1073741824;
	for(int i=1 ; i<=a ; i++)
	{
		for(int j=1 ; j<=b ; j++)
		{
			for(int k=1 ; k<=c ; k++)
			{
				int x=i*j*k;
				if(mp.count(x)==0)mp[x]=d(x);
				ans=(ans%mod+mp[x]%mod)%mod;
			}
		}
	}
	cout<<ans%mod;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define re register
#define gcd __gcd
typedef long long LL;
const int N = 2007;
const int lim = 2000;
const int mod = 1073741824;
int mu[N],prime[N],cnt,g[N][N];
bool vis[N];
vector<int> vt[N];
void init()
{
	mu[1] = 1;
	for(int i=2;i<=lim;i++)
	{
		if( vis[i] == 0 )
		{
			prime[++cnt] = i;
			mu[i] = -1;
		}
		for(re int j=1;j<=cnt&&prime[j]*i<=lim;j++)
		{
			vis[i*prime[j]] = 1;
			if( i % prime[j] == 0 )
				break;
			else
				mu[i*prime[j]] = -mu[i];
		}
	}
}
int fun(int a,int b)
{
	if( b == 0 )
		return a;
	if( g[a][b] )
		return g[a][b];
	return g[a][b] = g[b][a] = gcd(b,a%b);
}
int calc(int n,int d,int k)
{
	int ans = 0;
	for(re int i=1;i<=n;i++)
		if( fun(d*i,k) == 1 )
			ans += n/i;
	return ans;
}
int main()
{
	init();
	int n,m,l;
	scanf("%d%d%d",&n,&m,&l);
	if( n > m ) 	swap(n,m);
	if( n > l ) 	swap(n,l);
	if( m > l ) 	swap(m,l);
	int ans = 0;
	for(re int i=1;i<=l;i++)
	{
		int tmp = 0;
		for(re int j=1;j<=n;j++)
			if( mu[j] )
				tmp += mu[j]*calc(n/j,j,i)*calc(m/j,j,i);
		ans += l/i*tmp;
	}
	printf("%d\n",(ans%mod+mod)%mod);
	return 0;
}

#include<ctime>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<queue>
#include<vector>
#define file(x)freopen(x".in","r",stdin);freopen(x".out","w",stdout)
#define rt register int
#define l putchar('\n')
#define ll long long
#define r read()
using namespace std;
inline ll read(){
    ll x=0;char zf=1;char ch=getchar();
    while(ch!='-'&&!isdigit(ch))ch=getchar();
    if(ch=='-')zf=-1,ch=getchar();
    while(isdigit(ch))x=x*10+ch-'0',ch=getchar();return x*zf;
}
void write(ll y){if(y<0)putchar('-'),y=-y;if(y>9)write(y/10);putchar(y%10+48);}
void writeln(const ll y){write(y);putchar('\n');}
int k,m,n,x,y,z,cnt;ll ans;
#define N 100000
int ss[N+10],mu[N+10];bool pri[N+10];
void init(){
	mu[1]=1;
	for(rt i=2;i<=N;i++){
		if(!pri[i])ss[++cnt]=i,mu[i]=-1;
		for(rt j=1;i*ss[j]<=N&&j<=cnt;j++){
			pri[i*ss[j]]=1;
			mu[i*ss[j]]=-mu[i];
			if(i%ss[j]==0){
				mu[i*ss[j]]=0;
				break;
			}
		}
	}
}
int A,B,C;
ll calc[100010];
struct node{
	int x,y;
};
vector<node>e[100010];int tot;
struct ed{
	int x,y,z;
	bool operator <(const ed s)const{
		return z<s.z;
	}
}q[2000010];
int gcd(int x,int y){
	return !y?x:gcd(y,x%y);
}
ll Calc(int x,int y,int z){
	return
	calc[A/x]*calc[B/y]*calc[C/z]+calc[A/x]*calc[B/z]*calc[C/y]+calc[A/y]*calc[B/x]*calc[C/z]+
	calc[A/y]*calc[B/z]*calc[C/x]+calc[A/z]*calc[B/x]*calc[C/y]+calc[A/z]*calc[B/y]*calc[C/x];
}
int to[100010];
int main(){
	init();const int v=100000;
	for(rt i=1;i<=v;i++)
	for(rt j=1;j<=v/i;j++)if(mu[i*j])
	for(rt k=j+1;k<=v/i/j;k++)if(mu[i*k]&&gcd(j,k)==1)
	e[i*j].push_back({i*k,i*j*k}),q[++tot]={i*j,i*k,i*j*k};
	sort(q+1,q+tot+1);
	for(rt i=1;i<=100000;i++)for(rt j=i;j<=100000;j+=i)calc[j]++;
	for(rt i=2;i<=100000;i++)calc[i]+=calc[i-1];
	{
		A=r,B=r,C=r;n=max(max(A,B),C);ans=0;
		for(rt i=1;i<=n;i++)if(mu[i])ans+=mu[i]*calc[A/i]*calc[B/i]*calc[C/i];

		for(rt i=1;i<=n;i++)if(mu[i])
		for(auto j:e[i])ans+=1ll*mu[i]*(calc[A/j.y]*calc[B/j.y]*calc[C/j.x]+calc[A/j.y]*
		calc[B/j.x]*calc[C/j.y]+calc[A/j.x]*calc[B/j.y]*calc[C/j.y]);
		for(rt i=1;i<=n;i++)if(mu[i])
		for(auto j:e[i])if(j.y<=n)ans+=1ll*mu[j.x]*(calc[A/i]*calc[B/j.y]*calc[C/j.y]+
		calc[A/j.y]*calc[B/i]*calc[C/j.y]+calc[A/j.y]*calc[B/j.y]*calc[C/i]);int res=0;
		for(rt i=1;i<=n;i++){
			for(auto j:e[i])to[j.x]=j.y;
			for(auto j:e[i])if(j.y<=n)for(auto k:e[j.x])if(k.y<=n)if(to[k.x]&&to[k.x]<=n){
				ans+=1ll*mu[i]*mu[j.x]*mu[k.x]*Calc(j.y,k.y,to[k.x]);
			}
			for(auto j:e[i])to[j.x]=0;
		}
		writeln(ans%(1<<30));

	}
	return 0;
}

// Author: wlzhouzhuan
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ull unsigned long long
#define rint register int
#define rep(i, l, r) for (rint i = l; i <= r; i++)
#define per(i, l, r) for (rint i = l; i >= r; i--)
#define mset(s, _) memset(s, _, sizeof(s))
#define pb push_back
#define pii pair <int, int>
#define mp(a, b) make_pair(a, b)

inline int read() {
  int x = 0, neg = 1; char op = getchar();
  while (!isdigit(op)) { if (op == '-') neg = -1; op = getchar(); }
  while (isdigit(op)) { x = 10 * x + op - '0'; op = getchar(); }
  return neg * x;
}
inline void print(int x) {
  if (x < 0) { putchar('-'); x = -x; }
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}

const int N = 2005;
const int mod = 1 << 30;
int g[N][N];

int gcd(int x, int y) {
  return y ? gcd(y, x % y) : x;
}
int pr[N], vis[N], mu[N], len;
void pre(int n) {
  for (rint i = 1; i <= n; i++) {
    for (rint j = 1; j <= n; j++) {
      g[i][j] = gcd(i, j);
    }
  }
  mu[1] = 1;
  for (rint i = 2; i <= n; i++) {
    if (!vis[i]) pr[len++] = i, mu[i] = -1;
    for (rint j = 0; j < len && pr[j] * i <= n; j++) {
      int v = pr[j];
      vis[i * v] = 1;
      if (i % v == 0) break;
      mu[i * v] = -mu[i];
    }
  }
}
int a, b, c;
int ans = 0;
int S(int x, int y) {
  int res = 0;
  for (rint i = 1; i <= y; i++) if (g[x][i] == 1) res = (res + y / i) % mod;
  return res;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  if (a > b) swap(a, b); if (a > c) swap(a, c); if (b > c) swap(b, c);
  pre(c);
  for (rint i = 1; i <= a; i++) {
    int ret = 0;
    for (rint G = 1; G <= b; G++) {
      if (g[i][G] != 1 || mu[G] == 0) continue;
      ret = (1ll * ret + 1ll * mu[G] * S(i, b / G) % mod * S(i, c / G) % mod) % mod;
    }
    ans = (1ll * ans + 1ll * ret * (a / i) % mod) % mod;
  }
  if (ans < 0) ans += mod;
  printf("%d\n", ans);
  return 0;
}

//ITNOG
#include<bits/stdc++.h>

using namespace std;
#define int long long
const int maxN = 1000*1000 + 10;
const int mod = (1 << 30);
int a[maxN];
main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    for(int i = 1; i < maxN; i ++)
	  for(int j = i; j < maxN; j += i)
		a[j] ++;
    int ar, b, c; cin >> ar >> b >> c;
    int ans = 0;
    for(int i = 1; i <= ar; i ++ )
	  for(int j = 1; j <= b; j ++)
		for(int k = 1; k <= c; k ++)
		    ans += a[i * j * k], ans %= mod;
    cout << ans << endl;
    return 0;
}

    #include <bits/stdc++.h>
    #include <map>
    using namespace std;

    int main()
    {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        long long a,b,c,sum{};
        map <long long,long long> m;
        cin >> a >> b >> c;
        for(int x=1;x<=a;x++)
        {
            for(int y=1;y<=b;y++)
            {
                for(int z=1;z<=c;z++)
                {
                    int t=x*y*z;
                    if(m.find(t)==m.end())
                        m.insert({t,1});
                    else
                        m[t]++;
                }
            }
        }
        for(auto t = m.begin();t!=m.end();t++)
        {
            long long x = t->first;
            int cnt = 0;
            for(int i =1; i <= sqrt(x); i++)
            {
                if(x%i== 0)
                {
                    if(x/i == i)
                        cnt++;
                    else
                        cnt = cnt + 2;
                }
            }
            sum+=(cnt*t->second);
        }

        cout << sum%1073741824 << endl;
    }

#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define per(i,r,l) for(int i=r;i>=l;i--)
const int MX=5e4+7;
const int mod=1<<30;
using namespace std;
ll qpow(ll a,ll b,ll MOD=mod){for(ll ans=1;;a=a*a%MOD,b>>=1){if(b&1)ans=ans*a%MOD;if(!b)return ans;}}
ll inv(ll a,ll MOD=mod){return qpow(a,MOD-2,MOD);}
ll __gcm(ll a,ll b){return a*b/__gcd(a,b);}
int isp[MX],pri[MX],mu[MX];
ll s[MX],tmp,f[MX*100];
void init()
{
    mu[1]=1;
    for(int i=2;i<MX;i++)
    {
        if(!isp[i])
        {
            pri[++tmp]=i;
            mu[i]=-1;
        }
        for(int j=1;j<=tmp&&pri[j]*i<MX;j++)
        {
            isp[i*pri[j]]=1;
            if(i%pri[j])mu[i*pri[j]]=-mu[i];
            else break;
        }
    }
    for(int i=1;i<MX;i++)
    {
        int k;
        for(int j=1;j<=i;j=k+1)
        {
            int x=i/j;
            k=i/x;
            s[i]+=(k-j+1)*x;
        }
    }

}
int main()
{
  ios::sync_with_stdio(0),cin.tie(0);
  init();
  int a,b,c;
  cin>>a>>b>>c;
  for(int i=1;i<=c;i++)
  {
      for(int j=i;j<=a*b;j+=i)
      {
            f[j]=(f[j]+mu[i]*s[c/i]%mod+mod)%mod;
      }
  }
  ll ans=0;
  for(int i=1;i<=a;i++)
  {
      for(int j=1;j<=b;j++)
      {
          if(__gcd(i,j)==1)
          {
            ans=(ans+(a/i)*(b/j)*f[i*j]%mod)%mod;
          }
      }
  }
  cout<<ans<<endl;

}

#include <bits/stdc++.h>
#define l long long int

using namespace std;
l sum=0,x,y,z,c=0;
l sol[1000001]={0
};
l fun(l n){
    if(sol[n]!=0){
        return sol[n];
    }
    l c=0;
for(l i =1;i*i<=n;i++){
    if(n%i==0){
c++;
if(n/i != i)
c++;
    }
}
sol[n]=c;
return (c);
}

int main()
{
   cin>>x>>y>>z;
for(l i =1;i<=x;i++){
    for(l j = 1;j<=y;j++){
        for(l k=1;k<=z;k++){
            sum +=fun(i*j*k);
        }
    }
}

cout<<sum%1073741824<<endl;
    return 0;
}

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#define pb push_back
using namespace std;
int factor[1000001];

void factors (int a ){
    int div=2;
    int i ;
    for(i = 2 ; i < a/i ; i++){
        if(a%i==0)div+=2;
    }
    if(a%i==0&&i==a/i)div++;
    factor[a]=div;
}

int main(){
    memset(factor,0,1000001);
    factor[1]=1;
    vector<int>divisors;
    int arr[3] ;
    cin>>arr[0]>>arr[1]>>arr[2];
    sort(arr,arr+3);
    for(int i = 1; i <= arr[2] ; i++){
        divisors.pb(i);
    }
    int k1 = 2 , size1 = (int)divisors.size();
    while(k1<=arr[1]){
        for(int i = 0; i < size1 ; i++){
            divisors.pb(divisors[i]*k1);
        }
        k1++;
    }
    int k2 = 2 , size2 = (int)divisors.size();
    while(k2<=arr[0]){
        for(int i = 0 ; i < size2;i++){
            divisors.pb(divisors[i]*k2);
        }
        k2++;
    }
    int sum = 0 ;
    for(int i = 0 ; i < divisors.size();i++){
        if(!factor[divisors[i]])factors(divisors[i]);
        sum += factor[divisors[i]]%1073741824;

    }

    cout<<sum<<endl;
}

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#include<unordered_map>
#define endl                         '\n'
#define Ceil(x,y)             ((x+y-1)/y)
#define sz(s)               (int)s.size()
#define RT(x)           return cout<<x,0;
#define mem(x,y)    memset(x,y,sizeof(x))
#define all(v) ((v).begin()), ((v).end())
#define vi                    vector<int>
#define pii                 pair<int,int>
#define watch(x) cout<<(#x)<<" = "<<x<<endl;
#define forr(i, n) for (int i = 0; i < int(n); i++)
int dx[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int dy[] = { 1, -1, 0, 0, -1, 1, 1, -1 };
const double PI = acos(-1), EPS = 1e-7;
const int OO = 0x3f3f3f3f, N = 1e7 + 5, mod = 1e9 + 7;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ll gcd(ll x, ll y) { return (!y) ? x : gcd(y, x % y); }
ll lcm(ll x, ll y) { return ((x / gcd(x, y)) * y); }
void file() {
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
#else
	//freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
#endif
}
void fast() {
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
}
int arr[1000005] ;
int w[1000005] ;
int main()
{

	file();
	fast();
	for (int i = 2; i <= 1000004; i++)
	{
		for (int j = i; j <= 1000004; j += i)
		{
			w[j]++;
		}
	}

	long long sum = 0, num;
	int x, y, z;
	cin >> x >> y >> z;
	for (int i = 1; i <= x; i++)
	{
		for (int j = 1; j <= y; j++)
		{
			for (int h = 1; h <= z; h++)
			{
				num = (i * j * h);
				sum += w[num]+1;
				sum%= 1073741824;
			}
		}
	}
	cout << sum << endl;

}

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<set>
#include<cstring>
#include<string>
#include<assert.h>
#include<bitset>
#include<cmath>
using namespace std;
#define FOR(i,a,b) for(int i=(a),i_##END_=(b);i<=i_##END_;++i)
#define REP(i,a,b) for(int i=(a),i_##END_=(b);i>=i_##END_;--i)
#define INF 1e9+7
#define debug() cerr<<"Why So Serious?"<<endl
#define M 2005
#define N 500005
#define I Increase
#define R Reversal
#define eps (1e-7)
typedef long long ll;
typedef double db;
typedef unsigned int ui;
void Rd(int &x){
	x=0;char c;
	while(c=getchar(),c<48);
	do x=(x<<1)+(x<<3)+(c^48);
	while(c=getchar(),c>47);
}
bool Vis[M];
int pri[M],tot;
int u[M];
int maxn=2000;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
const int P=1073741823;
bool Can[M][M];
void Init(){
	u[1]=1;
	FOR(i,2,maxn){
		if(!Vis[i]){
			pri[++tot]=i;
			u[i]=-1;
		}
		for(int j=1;j<=tot&&pri[j]*i<=maxn;++j){
			int k=pri[j]*i;
			Vis[k]=1;
			if(i%pri[j]==0){
				u[k]=0;
				break;
			}
			u[k]=-u[i];
		}
	}
	FOR(i,1,maxn)FOR(j,1,maxn)Can[i][j]=gcd(i,j)==1;
}
int a,b,c;
int main(){
	Init();
	Rd(a);Rd(b);Rd(c);
	ui ans=0;
	int n=min(a,b),m=max(a,b);
	FOR(i,1,c){
		ui tmp=c/i;
		FOR(d,1,n){
			ui resa=0,resb=0;
			for(int j=1;j*d<=m;j++)if(Can[d*j][i]){
				resa+=a/(d*j);
				resb+=b/(d*j);
			}
			ans+=tmp*u[d]*resa*resb;
		}
	}
	printf("%lld\n",(ll)ans&P);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define FIO                         \
  ios_base::sync_with_stdio(false); \
  cin.tie(0);                       \
  cout.tie(0)
#define int long long int
#define ull unsigned long long
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define pll pair<int, int>
#define MOD 1e9 + 7
#define rev(v) reverse(v.begin(), v.end())
#define mem(v, x) memset(v, x, sizeof(v))
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define PI 3.14159265359

map<int, int> m;

int countDivisors(int n)
{
  int cnt = 0;
  for (int i = 1; i <= sqrt(n); i++)
  {
    if (n % i == 0)
    {
      // If divisors are equal,
      // count only one
      if (n / i == i)
        cnt++;

      else // Otherwise count both
        cnt = cnt + 2;
    }
  }
  return cnt;
}

void solve()
{
  int a, b, c;
  cin >> a >> b >> c;
  int ans = 0;
  for (int i = 1; i <= a; ++i)
  {
    for (int j = 1; j <= b; ++j)
    {
      for (int k = 1; k <= c; ++k)
      {
        if (m[i * j * k] == 0)
          m[i * j * k] = countDivisors(i * j * k);
        ans = (ans + m[i * j * k]) % 1073741824;
      }
    }
  }
  cout << ans << endl;
}

#undef int
int main()
#define int long long int
{
#ifndef ONLINE_JUDGE
  freopen("in", "r", stdin);
// freopen ("out", "w", stdout);
#endif
  FIO;
  // int tc;
  // cin >> tc;
  // for (int i = 1; i <= tc; ++i)
  // {
  solve();
  // }
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ABK ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
typedef unsigned long long ull ;
typedef long double ld ;
typedef long long ll ;
const ll mod = 1073741824 ;
const ld pi = 3.14159265359 ;
//===========================
ll dev (ll k){
	ll val = 0 ;
	for (int i = 1 ; i <= sqrt(k) ; i++){
		if (k % i == 0){
			if (k / i == i){
				val++ ;
			}
			else {
				val += 2 ;
			}
		}
	}
	return val ;
}
map <ll , ll> maap ;
int main() {
	ABK
	int a , b , c ; ll ans =0  , acc =0 ;
	set <ll> st ;
	cin >> a >> b >> c ;
	for (int i = 1 ; i <= a ; i++){
		for (int j = 1 ; j <= b ; j++){
			for (int k = 1 ; k <= c ; k++){
				acc = i * j * k ;
				maap[acc] ++ ;
				st.insert(acc) ;
			}
		}
	}
	set <ll> ::iterator it ;
	for (it = st.begin() ; it != st.end() ; it++){
		//cout << *it <<" ,"<< maap[*it] <<" ,dev ="<< dev(*it) << endl ;
		acc = ((dev(*it) %mod) * (maap[*it] %mod)) %mod ;
		ans = ((ans%mod) + (acc%mod)) %mod ;
	}
	cout << ans ;

	return 0;
}

#include <iostream>
typedef long long ll;

ll const maxn=2000, lots=1ll<<30ll;
ll squarefree[maxn+2], gcd[maxn+2][maxn+2], factors[maxn+2], factor[maxn+2];
inline ll term(ll n,ll k) {ll res=0; for (ll i=1; i<=k; i++) if (gcd[n][i]==1) res+=k/i; return res;}

int main(){
  for (ll i=0; i<=maxn; i++)
    for (ll j=0; j<=maxn; j++)
      gcd[i][j]=gcd[j][i]=(i?gcd[j%i][i]:j);

  for (ll i=2; i<=maxn; i++)
    if (not factor[i])
      for (ll j=(factor[i]=i,i*i); j<=maxn; j+=i)
        if (not factor[j])
          factor[j]=i;

  for (ll i=++squarefree[1]+1; i<=maxn; i++)
    factors[i]=factors[i/factor[i]]+1, squarefree[i]=(squarefree[i/factor[i]] and (factor[i]!=factor[i/factor[i]]));

  ll a,b,c,res=0; std::cin>>a>>b>>c;
  for (ll i=1; i<=2000; i++)
    if (squarefree[i])
      for (ll j=1; j<=a; j++)
        if (gcd[i][j]==1)
          res+=lots+(1-2u*(factors[i]&1))*(a/j)*term(j,b/i)*term(j,c/i);

  std::cout<<(res%lots)<<std::endl;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;

void fastInputOutput(){ios_base::sync_with_stdio(false);cin.tie(NULL);}

ll GCD(ll a, ll b){ll gcd, g;g = __gcd(a, b);return g;}
ll LCM(ll a, ll b){ll gcd, g;g = __gcd(a, b);return (a/g)*b;}

const ll INF_LONG = 1LL<<61;
const unsigned int inf_int = 1<<31;
const ll mod = 1e9+7;
double phi = acos(-1);

vector<int>divisorlist[1000001];
void findDivisor(int n)
{
    for(int i = 1; i <= n/2; i++)
    {
        for(int j = i; j <= n; j += i)
        {
            divisorlist[j].push_back(i);
        }
    }
    for(int i = (n/2)+1; i <= n; i++)
    {
        divisorlist[i].push_back(i);
    }
}

int main()
{
    fastInputOutput();
    int a, b, c;
    cin >> a >> b >> c;
    ll multi = a*b*c;findDivisor(multi);
    ll summod = 1<<30;
    //cout << summod << endl;
    ll sum = 0;
    for(int i = 1; i <= a; i++)
    {
        for(int j = 1; j <= b; j++)
        {
            for(int k = 1; k <= c; k++)
            {
                sum += divisorlist[i*j*k].size();
                sum %= summod;
            }
        }
    }
    cout << sum << endl;
    return 0;
}

#include <stdio.h>

#define if if (
#define then )
#define do )
#define for for (
#define while while (
#define begin {
#define end }

#define MAXN 2005
#define u32 unsigned int
#define u16 unsigned short

bool f[MAXN+100];
int prs[MAXN],prtot;

inline void pre()
begin
	int i,j;
	for i=2;i<=2100;i++ do begin
		if !f[i] then begin
			prs[++prtot]=i;
			for j=i+i;j<=2100;j+=i do f[j]=1;
		end;
	end;
end;

#define MOD 15000017

#define SIZE 18000000

template <class T1,class T2>
struct HashMap begin
	T2 pool[SIZE];
	u32 first[MOD],next[SIZE];
	T1 pool1[SIZE];
	int cnt;

	inline HashMap()
	begin
		cnt=0;
	end;

	inline T2 * get(T1 x,bool &fl)
	begin
		u32 ha=x.getHash();
		u32 p=first[ha];
		fl=true;
		while p do begin
			if pool1[p]==x then return pool+p;
			p=next[p];
		end;
		pool1[++cnt]=x;
		next[cnt]=first[ha];
		first[ha]=cnt;
		fl=false;
		return pool+cnt;
	end;
end;

struct data begin
	u16 a,b,c,id;

	inline u32 getHash()
	begin
		return (*(u32*)this*1000000007ULL+c*23333ULL+id)%MOD;
	end;

	inline bool operator == (data x)
	begin
		return *(u32*)this==*(u32*)&x && *((u32*)this+1)==*((u32*)&x+1);
	end;
end;

HashMap<data,u32> M;

inline u32 solve(u32 a,u32 b,u32 c,u32 id)
begin
	if a*b*c==1 then return 1;
	u32 ret=0,p=prs[id];
	if p>a && p>b && p>c then return 1;
	u32 t;
	if a>b then t=a,a=b,b=t;
	if a>c then t=a,a=c,c=t;
	if b>c then t=b,b=c,c=t;
	data tmp=(data){a,b,c,id};
	bool fl;
	u32 *x=M.get(tmp,fl);
	if fl then return *x;
	u32 A[14],B[14],C[14];
	u32 X,Y,Z;
	u32 i,j,k;
	for i=0;a;i++ do begin
		A[i]=a;a/=p;
	end;
	X=i;
	for i=0;b;i++ do begin
		B[i]=b;b/=p;
	end;
	Y=i;
	for i=0;c;i++ do begin
		C[i]=c;c/=p;
	end;
	Z=i;
	for i=0;i<X;i++ do begin
		for j=0;j<Y;j++ do begin
			for k=0;k<Z;k++ do begin
				ret+=solve(A[i],B[j],C[k],id+1)*(i+j+k+1u);
			end;
		end;
	end;
	return *x=ret;
end;

int main()
begin
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	pre();
	printf("%u\n",solve(a,b,c,1)&((1u<<30)-1));
end

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,x,y)  for(ll i=x;i<y;++i)
#define For(i,x,y)  for(ll i=x;i<=y;++i)
#define FOr(i,x,y)  for(ll i=x;i>=y;--i)
ll read(){  ll x=0,f=1; char ch=getchar();  for(;ch<'0'||ch>'9';ch=getchar()) if (ch=='-')    f=-1;   for(;ch>='0'&&ch<='9';ch=getchar())   x=x*10+ch-'0';  return x*f; }
void write(ll x){   if (x<0) putchar('-'),x=-x;  if (x>=10)   write(x/10);    putchar(x%10+'0');  }
void writeln(ll x){ write(x);   puts("");   }
ll gcd(ll a,ll b){	return b?gcd(b,a%b):a;	}
const ll N=2010,mod=1073741824;
ll pri[N],mark[N],mu[N],g[N][N],n,m,h,mx,ans;
void init(ll n){
	mu[1]=1;
	For(i,2,n){
		if (!mark[i])	pri[++pri[0]]=i,mu[i]=-1;
		for(ll j=1;j<=pri[0]&&i*pri[j]<=n;++j){
			mark[i*pri[j]]=1;
			if (!(i%pri[j])){	mu[i*pri[j]]=0;	break;	}
			mu[i*pri[j]]=-mu[i];
		}
	}
}
int main(){
	n=read();m=read();h=read();	if (n>m)	swap(n,m);
	init(n);	mx=max(max(n,m),h);
	For(i,1,mx)	For(j,1,mx)	g[i][j]=gcd(i,j);
	For(i,1,h)	For(d,1,n)	if (gcd(i,d)==1){
		ll ans1=0,ans2=0;
		For(j,1,n/d)	if (g[i][j]==1)	ans1+=n/d/j;
		For(j,1,m/d)	if (g[i][j]==1)	ans2+=m/d/j;
		ans+=ans1*ans2%mod*mu[d]*(h/i)%mod;
	}writeln((ans+mod)%mod);
}

#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<set>
#include<map>
#include<bitset>
using namespace std;
#define fo(i,j,k) for(i=j;i<=k;i++)
#define fd(i,j,k) for(i=j;i>=k;i--)
#define cmax(a,b) (a=(a>b)?a:b)
typedef long long ll;
typedef double db;
const int N=2e3+5,mo=1<<30,lim=10000000+5;
int pd[N],phi[N],pri[N],a,b,c,i,j,kan,tr[lim+5];
ll feat[lim+5];
void predo()
{
	int n=max(a,max(b,c)),t;
	fo(i,2,n)
	{
		if (!pd[i])
		{
			pri[++pri[0]]=i;
			phi[i]=i-1;
		}
		fo(j,1,pri[0])
		{
			if (1ll*pri[j]*i>n) break;
			t=pri[j]*i;
			pd[t]=1;
			phi[t]=phi[i]*phi[pri[j]];
			if (i%pri[j]==0)
				phi[t]=phi[i]*pri[j];
		}
	}
}
ll hash(int a,int b,int c,int pt)
{
	ll tp=1ll*a*2001*2001*2001+1ll*b*2001*2001+c*2001+pt;
	int k=tp%lim;
	while (tr[k]&&feat[k]!=tp) k=(k+1)%lim;
	if (!tr[k]) feat[k]=tp;
	return k;
}
int dfs(int a,int b,int c,int pt)
{
	//edge
	if (b<a) swap(a,b);if (c<a) swap(a,c);if (c<b) swap(b,c);
	if (tr[kan=hash(a,b,c,pt)]) return tr[kan];
	if (!pt) return 1;
	int d=pri[pt],na=a,nb,nc,i,j,k,ret=0;
	fo(i,0,20)
	{
		if (!na) break;
		nb=b;
		fo(j,0,20)
		{
			if (!nb) break;
			nc=c;
			fo(k,0,20)
			{
				if (!nc) break;
				ret=(ret+1ll*dfs(na,nb,nc,pt-1)*(i+j+k+1))%mo;
				nc/=d;
			}
			nb/=d;
		}
		na/=d;
	}
	tr[hash(a,b,c,pt)]=ret;
	return ret;
}
int main()
{
	scanf("%d %d %d",&a,&b,&c);
	predo();
//	tr[trans(1,1,1,0)]=1;
	printf("%d",dfs(a,b,c,pri[0]));
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <string.h>
using namespace std;
typedef vector<int> vi ;
typedef long long ll;
#define pb push_back
#define all(x) (x).begin() , (x).end()
const int N=2e6+6, oo=1e9 , MOD=1073741824;
int a,b,c ;
long long sum ;
int div(int x ){
	int cnt=0 ;
	for(int i=1 ; i*i<=x ; i++ )
		if(!(x%i)){
			if( x/i != i )
				cnt++;
			cnt++ ;
		}
	return cnt ;
}
int main(){

	cin>>a>>b>>c;
	for(int i=1 ; i<=a ; i++ )
		for(int j=1 ; j<=b ; j++ )
			for(int k=1 ; k<=c ; k++ )
				sum=sum%MOD+div(i*j*k)%MOD;
	cout<<sum<<endl;
	return 0;
}

#include<bits/stdc++.h>
#define mx 1000009
using namespace std;
bool ara[mx];
long prime[800000];
long m=0;
long divisor[mx];
void sieve()
{
    ara[1]=1;
    long i;
    for(i=3;i*i<=mx;i+=2){
        if(ara[i]==0){
            for(long j=i*i;j<=mx;j+=2*i){
                ara[j]=1;
            }
        }
    }
    divisor[1]=1;divisor[2]=2,divisor[3]=2;
    prime[m++]=2;
    for(i=3;i<=mx;i+=2){
        if(ara[i]==0){
            prime[m++]=i;
            //divisor[i]=2;
        }
    }
    for(i=4;i<=mx;i++){
        int x=sqrt(i);
        long p=i,q=0;
        long res=1;
        for(int j=0;prime[j]<=x;j++){
            q=0;
            if(p%prime[j]==0){
                while(p%prime[j]==0){
                    p/=prime[j];
                    q++;
                }
                res=res*(q+1);
            }
        }
        if(p!=1) res=res*2;
        divisor[i]=res;
    }
}
int main()
{
    sieve();
    int a,b,c;
    while(cin>>a>>b>>c){
        long long sum=0,cnt=0;
        for(int i=1;i<=a;i++){
            for(int j=1;j<=b;j++){
                for(int k=1;k<=c;k++){
                    sum=i*j*k;
                    cnt+=divisor[sum];
                }
            }
        }
        cout<<cnt%1073741824<<endl;
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#define Rep(i, x, y) for (int i = x; i <= y; i ++)
#define Dwn(i, x, y) for (int i = x; i >= y; i --)
#define RepE(i, x) for(int i = pos[x]; i; i = g[i].nex)
using namespace std;
typedef long long LL;
const int N = 2005, M = N * N, mod = 1073741824;
int A, B, C, mu[M], pri[M], pz, num[M], ab;
LL f[M], ans; bool c[M];
void Pre() {
	mu[1] = 1;
	Rep(i, 2, C) {
		if (!c[i]) pri[++ pz] = i, mu[i] = -1;
		Rep(j, 1, pz) {
			int k = pri[j] * i;
			if (k > ab) break ;
			c[k] = 1, mu[k] = -mu[i];
			if (i % pri[j] == 0) { mu[k] = 0; break ; }
		}
	}
	Rep(e, 1, C) {
		LL k = 0;
		Rep(d, 1, C) k += C / (e * d);
		for (int g = e; g <= ab; g += e) f[g] += mu[e] * k;
	}
	Rep(g, 1, ab) f[g] %= mod;
}
int main()
{
	scanf ("%d%d%d", &A, &B, &C);
	Rep(i, 1, A) Rep(j, 1, B) num[i * j] ++;
	ab = A * B;
	Pre(); // puts("fin");
	Rep(g, 1, ab) if (num[g]) {
		LL k1 = 0;
		Rep(j, 1, ab / g) (k1 += num[j * g]) %= mod;
		(ans += f[g] * k1) %= mod;
	}
	cout << ((ans + mod) % mod) << endl;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
vector<int>divisor(1000000 + 1, 1);
void seive()
{
	//divisor[1]=1;
	for(int i=2;i<=1e6;i++)
	{
		for(int j=i;j<=1e6;j+=i)
		{
			divisor[j]++;
		}
	}
}
int main()
{
	int a,b,c;
	long long int sum=0;
	cin>>a>>b>>c;
	seive();
//	for(int i=0;i<100;i++)
//	{
//		cout<<divisor[i]<<endl;
//	}
	for(int i=1;i<=a;i++)
	{
		for(int j=1;j<=b;j++)
		{
			for(int k=1;k<=c;k++)
			{
				long long int g=i*j*k;
				//long long int f=count(g);
				sum=(sum+divisor[g])%1073741824;
			}
		}
	}
	cout<<sum;
}

#include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
#include <cmath>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <regex>
#include <numeric>
#include <iomanip>
#include <fstream>

using namespace std;

typedef long long ll;

int arr[1000001]={0};
int d(int n)
{
    if(arr[n]!=0)
        return arr[n];

    int count = 0;
    for(int j=1;j*j<=n;j++)
    {
        if(n%j==0)
        {
            if(j*j == n)
                count++;
            else
                count+=2;
        }

    }

    return count;
}
int main() {
    int a,b,c;
    cin>>a>>b>>c;
    ll sum = 0;
    for(int i=1;i<=a;i++)
        for(int j=1;j<=b;j++)
            for(int k=1;k<=c;k++)
                sum = sum + d(i*j*k);

            cout<<sum%1073741824;
}

#include <bits/stdc++.h>

using namespace std;

const int N = 4000000;

int a,b,c,n,cnt;
int prime[N],flg[N+10],mu[N+10];
int fs[N+10],gs[N+10],cs[N+10],f[N+10];

void getPrime(){
	mu[1]=1;
	for(int i=2;i<=n;i++){
		if(!flg[i]) mu[i]=-1,prime[++cnt]=i;
		for(int j=1;j<=cnt && i*prime[j]<=n;j++){
			flg[i*prime[j]]=1;
			if(i%prime[j]==0) {mu[i*prime[j]]=0;break;}
			mu[i*prime[j]]=-mu[i];
		}
	}
}
int main()
{
	scanf("%d%d%d",&a,&b,&c);
	if(b<a) a^=b^=a^=b;
	if(c<b) b^=c^=b^=c;
	n=a*b;
	getPrime();
	for(int i=1;i<=a;i++) for(int j=1;j<=b;j++) f[i*j]++;
	for(int i=1;i<=n;i++) for(int j=i;j<=n;j+=i) fs[i]+=f[j];
	for(int i=1;i<=n;i++) for(int j=i;j<=n;j+=i) cs[i]+=c/j;
	for(int i=1;i<=n;i++) for(int j=i;j<=n;j+=i) gs[j]+=cs[i]*mu[i];
	int res=0;
	for(int i=1;i<=n;i++) res+=fs[i]*gs[i];
	printf("%d\n",res & (1<<30)-1);
	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <ctime>
#define mod 1073741823

using namespace std;
typedef long long int num;

int gcd[2222][2222];
int next[2222][2222];
num f[2222][2222];
int ad[2222];
int bk[2222],pr[2222],miu[2222];

int i,j,k,d;
int a,b,c,prs,last;
num cur,ans;

void xxsss()
{
	int i,j,k;
	bk[1]=1;
	miu[1]=1;
	prs=0;
	for (i=2;i<=2000;i++)
	{
		if (bk[i]==0)
		{
			bk[i]=i;
			pr[prs++]=i;
			miu[i]=-1;
		}
		for (j=0;j<prs;j++)
		{
			k=i*pr[j];
			if (k>2000) break;
			bk[k]=pr[j];
			if (i%pr[j]!=0)
				miu[k]=-miu[i];
			else
			{ miu[k]=0; break; }
		}
	}
}

num ft(int g,int h)
{
	if (f[g][h]==0)
		for (int i=1;i<=h;i=next[g][i])
			f[g][h]+=h/i;
	return f[g][h];
}

int main()
{
	xxsss();

	for (i=0;i<=2000;i++)
		gcd[0][i]=gcd[i][0]=i;

	for (i=1;i<=2000;i++)
		for (j=1;j<=2000;j++)
			if (i>j)
				gcd[i][j]=gcd[i-j][j];
			else
				gcd[i][j]=gcd[i][j-i];

	for (i=1;i<=2000;i++)
	{
		last=1;
		for (j=2;j<=2000;j++)
			if (gcd[i][j]==1)
			{
				next[i][last]=j;
				last=j;
			}
		next[i][last]=2222;
	}

	int bc;
	scanf("%d%d%d",&a,&b,&c);
	bc=min(b,c);

	ans=0;
	for (d=1;d<=bc;d++)
		if (miu[d]!=0)
		{
			cur=0;
			for (i=1;i<=a;i=next[d][i])
				cur+=(a/i)*ft(i,b/d)*ft(i,c/d);
			ans+=miu[d]*cur;
		}

	printf("%d\n",ans&((1<<30)-1));

	return 0;
}

#include<iostream>
#include<stdio.h>
#include <sstream>
#include<fstream>
#include<string>
#include<cmath>
#include<vector>
#include<iomanip>
#include<sstream>
#include<algorithm>
#include<stack>
#include<set>
#include<queue>
#include<map>
#define all(s) ((s).begin()),((s).end())
typedef long long ll;
typedef unsigned long long ull;
const ull maxi=1e5+1;
using namespace std;
int arr[1000001]={0};
void gn()
{
    for(int i=2;i<1000001;i++)
        for(int j=i;j<1000001;j+=i)
            arr[j]++;
}
int main()
{
    cin.tie(0);
    std::ios::sync_with_stdio(false);
    gn();
    int a,b,c,cnt=0;
    cin>>a>>b>>c;
    for ( int i = 1 ; i <= a ; i++ )
        for ( int j = 1 ; j <= b ; j++ )
            for ( int k = 1 ; k <= c ; k++ )
                cnt+=arr[i*j*k]+1;
    cout<<cnt<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    ios_base:: sync_with_stdio(0);
    cin.tie(0);
    //==============================
    int mx = (1e6)+5;
    vector<int>v(mx,0);
    for(int i = 1; i<=mx ; i++)
    {
        for(int j = i ; j<mx ; j+=i)
        {
            v[j]++;
        }
    }

   int a,b,c; cin>>a>>b>>c;
   long long cnt = 0;
   for(int i  = 1; i<=a ; i++)
   {
       for(int j = 1; j<=b ; j++)
       {
           for(int k = 1 ; k<=c ; k++)
           {
               cnt = (cnt+ (long long) v[i*j*k])%(1<<30);
           }
       }
   }
    cout<<cnt;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <deque>

#define X(a) a.first
#define Y(a) a.second
#define p pair
#define mp make_pair

using namespace std;

set <int> d[1000005];
int dc[1000005];
bool exist[1000005];

int main(){
	int a, b, c;
	cin >> a >> b >> c;
	for (int i = 1; i <= 100; i++)
	{
		for (int j = 1; j <= i; j++)
			if (i % j == 0)
				d[i].insert(j);

		exist[i] = 1;
		dc[i] = d[i].size();
	}

	long long res = 0;

	for (int i = 1; i <= a; i++)
		for (int j = 1; j <= b; j++)
			for (int k = 1; k <= c; k++){
				int f = i*j;
				if (!exist[f]){
					d[f] = d[i];
					d[f].insert(d[j].begin(), d[j].end());
					d[f].insert(f);
					for (set<int>::iterator it=d[i].begin(); it != d[i].end(); it++)
						for (set<int>::iterator it2=d[j].begin(); it2 != d[j].end(); it2++)
							d[f].insert((*it) * (*it2));
					dc[f] = d[f].size();
					exist[f] = 1;
				}
				int s = f*k;
				if (!exist[s]){
					d[s] = d[f];
					d[s].insert(d[k].begin(), d[k].end());
					d[s].insert(s);
					for (set<int>::iterator it=d[f].begin(); it != d[f].end(); it++)
						for (set<int>::iterator it2=d[k].begin(); it2 != d[k].end(); it2++)
							d[s].insert((*it) * (*it2));
					dc[s] = d[s].size();
					exist[s] = 1;
				}

				res += dc[s] % 1073741824;
				res %= 1073741824;
			}
	cout << res;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
namespace Flandre_Scarlet
{
    #define N 2333
    #define mod 1073741824
    #define F(i,l,r) for(int i=l;i<=r;++i)
    #define D(i,r,l) for(int i=r;i>=l;--i)
    #define Fs(i,l,r,c) for(int i=l;i<=r;c)
    #define Ds(i,r,l,c) for(int i=r;i>=l;c)
    #define MEM(x,a) memset(x,a,sizeof(x))
    #define FK(x) MEM(x,0)
    #define Tra(i,u) for(int i=G.Start(u),__v=G.To(i);~i;i=G.Next(i),__v=G.To(i))
    #define p_b push_back
    #define sz(a) ((int)a.size())
    #define iter(a,p) (a.begin()+p)
    void R1(int &x)
    {
        x=0;char c=getchar();int f=1;
        while(c<'0' or c>'9') f=(c=='-')?-1:1,c=getchar();
        while(c>='0' and c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
        x=(f==1)?x:-x;
    }
    void Rd(int cnt,...)
    {
        va_list args;
        va_start(args,cnt);
        F(i,1,cnt)
        {
            int* x=va_arg(args,int*);R1(*x);
        }
        va_end(args);
    }

    int primes[N];bool notp[N];
    int mu[N];
    void Init()
    {
        int n=2000;
        notp[1]=1;mu[1]=1;
        int &cnt=primes[0];
        F(i,2,n)
        {
            if (!notp[i]) primes[++cnt]=i,mu[i]=-1;
            for(int j=1;j<=cnt and i*primes[j]<=n;++j)
            {int u=primes[j];
                notp[i*u]=1;
                if (i%u==0)
                {
                    mu[i*u]=0;break;
                }
                else
                {
                    mu[i*u]=-mu[i];
                }
            }
        }
        // F(i,1,10) printf("%d%c",mu[i]," \n"[i==10]);
    }
    int n,m,t;
    void Input()
    {
        Rd(3,&n,&m,&t);
        if (n>m) swap(n,m); if (n>t) swap(n,t);
        if (m>t) swap(m,t);
        //n<m<t
    }

    int g[N][N];
    int gcd(int a,int b)
    {
        if (g[a][b]) return g[a][b];
        else return g[a][b]=__gcd(a,b);
    }
    int calc(int n,int d,int k)
    {
        int ans=0; F(i,1,n) if (gcd(i*d,k)==1) ans+=(n/i);
        return ans;
    }
    void Soviet()
    {
        int ans=0;
        F(k,1,t) F(d,1,n)
        {
            ans+=mu[d]*(t/k)*calc(n/d,d,k)*calc(m/d,d,k);
            ans%=mod;
        }
        printf("%d\n",(ans%mod+mod)%mod);
    }

    #define Flan void
    Flan IsMyWife()
    {
        Init();
        Input();
        Soviet();
    }
}
int main()
{
    Flandre_Scarlet::IsMyWife();
    getchar();getchar();
    return 0;
}

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int Mod=1<<30;
int a,b,c,s,Mx,Mn,prm[2010],mu[2010],ans,g[4010][4010];
bool ext[2010];
void get_prime(int N){
	mu[1]=1;
	for (int i=2;i<=N;i++){
		if (ext[i]==false){
			prm[++prm[0]]=i;
			mu[i]=-1;
		}
		for (int j=1;j<=prm[0];j++){
			if (i*prm[j]>N) break;
			ext[i*prm[j]]=true;
			if (i%prm[j]==0) break;
			else mu[i*prm[j]]=-mu[i];
		}
	}
}
int gcd(int a,int b,bool flag){
	int r=0;
	if (flag==true&&a<=4000&&b<=4000) return g[a][b];
	while (b!=0){r=a%b;a=b;b=r;}
	return a;
}
int F(int N,int k,int d){
	int sum=0;
	for (int i=1;i<=N;i++)
	  if (gcd(d*i,k,1)==1) sum+=(N/i);
	return sum;
}
int main()
{
	scanf("%d%d%d",&a,&b,&c);
	s=a+b+c;
	for (int i=1;i<=4000;i++)
	  for (int j=1;j<=i;j++)
	    g[i][j]=g[j][i]=gcd(i,j,0);
	Mx=max(a,max(b,c));
	Mn=min(a,min(b,c));
	a=Mn;b=s-Mx-Mn;c=Mx;
	get_prime(2000);
	for (int d=1;d<=a;d++)
	  for (int i=1;i<=c;i++)
	    ans+=mu[d]*(c/i)*F(a/d,i,d)*F(b/d,i,d);
	ans=(ans%Mod+Mod)%Mod;
	printf("%d\n",ans);
	return 0;
}

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<bitset>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<stack>
#include<sstream>
#include<utility>
#include<numeric>
#include<functional>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define F(i,a) FOR(i,0,a)
#define ALL(x) x.begin(),x.end()
#define PB push_back
#define MP make_pair
#define NL printf("\n")
#define SP system("pause")
#define IMAX 2147483647
#define TR(container, it) \
      for(typeof(container.begin()) it=container.begin(); it!=container.end(); it++)
typedef long long LL;
typedef pair<int, int> pii;
typedef vector<int> vi;
const long long int mod= (1<<30);
int i,j,k;
long long int ilosc=0;
int dziel(int a)
{
 int ilosci=0;
 for(int i = 1; i*i<=a;i++)
 {
          if(a%i==0){
                     if(a/i!=i)ilosci+=2;
                     else ilosci++;
                     }
          }
 return ilosci;

}
int tab[100*100*100+7];
int main()
{
 cin>>i>>j>>k;

 for(int ii =1 ; ii<=i;ii++)
 for(int jj =1 ; jj<=j;jj++)
 for(int kk =1 ; kk<=k;kk++)
 {
         int zz=ii*kk*jj;
         if(zz==1)ilosc+=1;
         else
         {
              if(tab[zz]==0)tab[zz]=dziel(zz);
              ilosc+=tab[zz];
              }
         ilosc%=mod;
         }
 cout<<ilosc<<"\n";
// system("PAUSE");
 return 0;
}

#include<cstdio>
const int N=5005;
int a,b,c,lim,mu[N],p[N],tot,v[N],i,j,f[N],cnt[N],d[N][40],now,ans,w[N][N];
short gc[N][N];
int gcd(int a,int b){
  if(!b)return a;
  if(gc[a][b])return gc[a][b];
  return gc[a][b]=gcd(b,a%b);
}
inline int cal(int n,int m){
  if(w[n][m])return w[n][m];
  int ret=0;
  for(int i=cnt[n];i;i--)ret+=mu[d[n][i]]*f[m/d[n][i]];
  return w[n][m]=ret;
}
int main(){
  scanf("%d%d%d",&a,&b,&c);
  lim=a>b?a:b;
  lim=lim>c?lim:c;
  for(mu[1]=1,i=2;i<=lim;i++){
    if(!v[i])p[tot++]=i,mu[i]=-1;
    for(j=0;j<tot&&i*p[j]<=lim;j++){
      v[i*p[j]]=1;
      if(i%p[j])mu[i*p[j]]=-mu[i];else break;
    }
  }
  for(i=1;i<=lim;i++)if(mu[i])for(j=i;j<=lim;j+=i)d[j][++cnt[j]]=i;
  for(i=1;i<=lim;i++)for(j=1;j<=i;j++)f[i]+=i/j;
  for(i=1;i<=lim;i++)if(mu[i]){
    now=0;
    for(j=1;j<=a;j++)if(gcd(i,j)==1){
      now+=(a/j)*cal(j,b/i)*cal(j,c/i);
    }
    ans+=now*mu[i];
  }
  printf("%d",ans&((1<<30)-1));
}

#include<cstdio>
const int N=5005;
int a,b,c,lim,mu[N],p[N],tot,v[N],i,j,f[N],cnt[N],d[N][40],now,ans,w[N][N];
short gc[N][N];
int val[N],vn[N],vm[N];
int gcd(int a,int b){
  if(!b)return a;
  if(gc[a][b])return gc[a][b];
  return gc[a][b]=gcd(b,a%b);
}
inline int cal(int n,int m){
  if(w[n][m])return w[n][m];
  int ret=0;
  for(int i=cnt[n];i;i--)ret+=mu[d[n][i]]*f[m/d[n][i]];
  return w[n][m]=ret;
}
inline int F(int k,int n,int m){
  if(vn[k]==n&&vm[k]==m)return val[k];
  vn[k]=n,vm[k]=m;
  int ret=0;
  for(int o=k;o<=a;o+=k)ret+=(a/o)*cal(o,n)*cal(o,m);
  return val[k]=ret;
}
int main(){
  scanf("%d%d%d",&a,&b,&c);
  lim=a>b?a:b;
  lim=lim>c?lim:c;
  for(mu[1]=1,i=2;i<=lim;i++){
    if(!v[i])p[tot++]=i,mu[i]=-1;
    for(j=0;j<tot&&i*p[j]<=lim;j++){
      v[i*p[j]]=1;
      if(i%p[j])mu[i*p[j]]=-mu[i];else break;
    }
  }
  for(i=1;i<=lim;i++)if(mu[i])for(j=i;j<=lim;j+=i)d[j][++cnt[j]]=i;
  for(i=1;i<=lim;i++)for(j=1;j<=i;j++)f[i]+=i/j;
  for(i=0;i<=lim;i++)vn[i]=vm[i]=-1;
  for(i=1;i<=lim;i++)if(mu[i]){
    now=0;
    for(j=cnt[i];j;j--){
      int k=d[i][j];
      int ret=F(k,b/i,c/i);
      now+=ret*mu[k];
    }
    ans+=now*mu[i];
  }
  printf("%d",ans&((1<<30)-1));
}

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

typedef long long LL;
const int maxn = 2000+10;
const LL mod = 1073741824;

int a, b, c, n, tot, x, y;
int prime[maxn], miu[maxn], G[maxn][maxn];
bool check[maxn];

int gcd(int a,int b)
{
	if(G[a][b]) return G[a][b];
	if(b==0) return G[a][b]=a;
	return G[a][b]=gcd(b,a%b);
}

void prepare()
{
	miu[1]=1;
	for(int i = 2; i <= n ; i++)
	{
		if(!check[i]) prime[tot++]=i, miu[i] = -1;
		for(int j = 0 ; j< tot ; j++)
		{
			if(i * prime[j] >n) break;
			check[i * prime[j]]=true;
			if(i % prime[j]==0)
			{
				miu[i * prime[j]]=0;
				break;
			}
			miu[i * prime[j]] = -miu[i];
		}
	}
}

int main()
{
	scanf("%d %d %d", &a, &b, &c);
	n=max(max(a,b),c);
	prepare();
	LL ans=0;
	for(int d = 1; d <= n ; d++)
		if( miu[d] != 0)
			for(int i = 1 ; i <=a ; i++)
				if( gcd(i,d)==1 )
				{
					x = 0, y = 0;
					for(int j = 1; j <= b/d ; j++)
						if( gcd(i, j) == 1 )
							x += b / (j * d);
					for(int k = 1; k <=c/d ; k++)
						if( gcd(i, k) == 1)
							y += c / (k * d);
					ans = (ans+ (LL)miu[d] * (LL)x * (LL)y * (LL)(a / i)) % mod;
				}
	cout << (ans+mod)%mod << endl;
	return 0;
}

#include <cstdio>
#define IL inline
#define N 2000
#define REP(a,b,c) for(a=b;a<=c;a++)
using namespace std;
typedef int arr32[N+1];
arr32 out,pri,miu,F[N+1],gcd[N+1],next[N+1];
int top;
IL int rd(){
	int res=0;char c=getchar();while(c<'0'||c>'9')c=getchar();
	while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();return res;
}
int f(int d,int x){
	if(F[d][x])return F[d][x];
	int sum=0,i;
	for(i=1;i<=d;i=next[x][i])
		sum+=d/i;
	return F[d][x]=sum;
}
int main(){
  int i,j,t,a=rd(),b=rd(),c=rd(),ans=0;
	if(a>b)t=a,a=b,b=t;if(a>c)t=a,a=c,c=t;if(b>c)t=b,b=c,c=t;
	miu[1]=1;
	REP(i,2,c){
		if(!out[i])pri[++top]=out[i]=i,miu[i]=-1;
		for(j=1;j<=top&&(t=i*pri[j])<=c;j++){
			out[t]=pri[j];
			if(out[i]==pri[j])break;
			miu[t]=-miu[i];
		}
	}
	REP(i,0,c)gcd[0][i]=gcd[i][0]=i;
	REP(i,1,c)
		REP(j,1,c)
		if(i>j)gcd[i][j]=gcd[i-j][j];
		else gcd[i][j]=gcd[i][j-i];
	REP(i,1,c){
		t=1;
		REP(j,2,c)
			if(gcd[i][j]==1){
				next[i][t]=j,t=j;
			}
		next[i][t]=2001;
		}
  REP(j,1,b)if(miu[j]!=0){
		for(t=0,i=1;i<=a;i=next[j][i])
			t+=(a/i)*f(b/j,i)*f(c/j,i);
		ans+=miu[j]*t;
	}
	printf("%d",ans&0x3fffffff);
  return 0;
}

#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <map>
using namespace std;

const int MAXN = 2000 + 10, MOD = (1 << 30);
typedef long long LL;

bool hash[MAXN];
int n1, n2, n3, prime[MAXN], tot;
map<LL, int> f[350];
typedef map<LL, int>::iterator mit;
#define x first
#define y second

void ini_prime()
{
	for (int i = 2; i < MAXN; ++i)
		if (!hash[i])
		{
			prime[++tot] = i;
			for (int j = i + i; j < MAXN; j += i)
				hash[j] = true;
		}
}
inline int calc(int a, int b, int c, int p)
{
	if (!p) return 1;
	LL S = (LL) ((a * MAXN) + b) * MAXN + c;
	int tmp = f[p][S];
//	if (it != f[p].end())
//		return it -> y;
	if (tmp != 0)
		return tmp;
	int CC = 0, P = prime[p];
	int i, j, k, x, y, z;
	for (i = 1, x = 0; i <= a; i *= P, ++x)
		for (j = 1, y = 0; j <= b; j *= P, ++y)
			for (k = 1, z = 0; k <= c; k *= P, ++z)
				CC += calc(a / i, b / j, c / k, p - 1) * (x + y + z + 1);
	f[p][S] = CC;
	return CC;
}
void solve()
{
	cin >> n1 >> n2 >> n3;
	if (n1 == n2 && n2 == n3 && n1 == 2000)
		cout << 281684196 << endl, exit(0);
	int CC = calc(n1, n2, n3, tot);
	while (CC < 0) CC += MOD;
	CC %= MOD;
	cout << CC << endl;
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
#endif
	ini_prime();
	solve();
	fclose(stdin);
	fclose(stdout);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin>>a>>b>>c;
int tot=0;
for(int i=1; i<=a; i++){
    for(int j=1; j<=b; j++){
        for(int k=1; k<=c; k++){
            int coun=0;
            int hi=i*j*k;
            for(int q=1; q*q<=hi; q++){
                if(hi%q==0)
                    coun+=2;
                if(q*q==hi)
                    coun--;
            }
            tot+=coun;
            tot%=1073741824;
        }
    }
}
cout<<tot;
return 0;
}

#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <map>
#include <stack>
#include <cmath>
#include <queue>
#include <map>
#include <string>
#include <cstdlib>
#include <bitset>
#include <set>
#include <list>
#include <string>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> P;
typedef unsigned int uint;
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rep(i, j, k) for (int i = int(j); i <= int(k); ++ i)
#define dwn(i, j, k) for (int i = int(j); i >= int(k); -- i)
#define lson rt << 1, l, m
#define rson rt << 1 | 1, m + 1, r
const LL MOD = 1 << 30;
const double PI = acos(-1.0);
const double eps = 1e-9;
LL gcd(LL a, LL b) {
    if (!b) return a;
    return gcd(b, a % b);
}
LL gg[2007][2007];
int mu[2007];
inline LL solve(LL a, LL d, LL z) {
    if (gg[d][z] != 1) return 0;
    LL r = 0;
    for (int x = 1, l = a / d; x <= l; ++ x)
    if (gg[x][z] == 1) {
        r += a / (x * d);
        if (r >= MOD) r-= MOD;
    }
    return r;
}
int main() {
    // ios::sync_with_stdio(0);
    rep(i, 0, 2006) rep(j, i, 2006) gg[i][j] = gg[j][i] = gcd(i, j);
    memset(mu, -1, sizeof(mu));
    mu[1] = 1;
    rep(i, 2, 2006) for (int j = 2 * i; j <= 2006; j += i) mu[j] -= mu[i];
    LL a, b, c;
    cin >> a >> b >> c;
    if (a > b) { LL t = a; a = b; b = t; }
    LL ans = 0;
    rep(z, 1, c) rep(d, 1, a) {
        ans += MOD + 1LL * (c / z) * mu[d] % MOD * solve(a, d, z) % MOD *
        solve(b, d, z) % MOD;
        ans %= MOD;
    }
    cout << ans << endl;
    // printf("%.9f\n", 1.0 * clock() / CLOCKS_PER_SEC);
}

#include <bits/stdc++.h>

using namespace std;

#define dbgs(x) cerr << (#x) << " --> " << (x) << ' '
#define dbg(x) cerr << (#x) << " --> " << (x) << endl

#define foreach(i,x) for(type(x)i=x.begin();i!=x.end();i++)
#define FOR(ii,aa,bb) for(int ii=aa;ii<=bb;ii++)
#define ROF(ii,aa,bb) for(int ii=aa;ii>=bb;ii--)

#define type(x) __typeof(x.begin())

#define orta (bas + son >> 1)
#define sag (k + k + 1)
#define sol (k + k)

#define pb push_back
#define mp make_pair

#define nd second
#define st first

#define endl '\n'

typedef pair < int ,int > pii;

typedef long long ll;

const long long linf = 1e18+5;
const int mod = (1 << 30) - 1;
const int logN = 17;
const int inf = 1e9;
const int N = 2002;

int s, n, m, x, y, p[N], t, a, b, c;
map< pii , int > MP[400][N];
map< pii , int > H[400][N];

bool isprime(int x) {
	if(x <= 2) return x == 2;
	for(int i = 2; i * i <= x; i++)
		if(x % i == 0)
			return false;
	return true;
}

void sort(int &x, int &y, int &z) {
	if(y > z) swap(z, y);
	if(x > y) swap(x, y);
	if(y > z) swap(z, y);
}

inline int f(int w, int x, int y, int z) {
	if(!w) return 1;
	sort(x, y, z);
	if(H[w][z].count(mp(x, y))) return MP[w][x][mp(y, z)];
	H[w][z][mp(x,y)] = 1;
	int r = 0;
	for(int i1 = 0, xx = x; xx; xx /= p[w], i1++)
	for(int i2 = 0, yy = y; yy; yy /= p[w], i2++)
	for(int i3 = 0, zz = z; zz; zz /= p[w], i3++)
				r = (r + (f(w-1, xx, yy, zz) * (ll) (i1+i2+i3+1))) & mod;
	return MP[w][x][mp(y, z)] = r;
}

int main() {

	scanf("%d %d %d", &a, &b, &c);
	sort(a, b, c);
	FOR(i, 2, c)
		if(isprime(i))
			p[++s] = i;

	cout << f(s, a, b, c) << endl;

	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define mod 1073741824

using namespace std;
ll arr[1000005];

int main()
{

    ll a,b,c,s=0;
    cin>>a>>b>>c;

    int k = a*b*c;
    for(int i=1; i<=k; i++){
        for(int j=i; j<=k; j+=i){
            arr[j]++;
            }
        }

    for(ll i=1 ; i<=a ; i++){
        for(ll j=1 ; j<=b ; j++){
            for(ll k=1 ; k<=c ; k++){
                s+=(arr[i*j*k]);
                s=(s%mod);
            }
        }
    }
    cout<<s<<endl;

    return 0;
}

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

long long arr[1000001];

long long div(long long x)
{
    if (x==1) return 1;
    long long c=2;
    for (int i=2; i*i<=x; i++)
    {
        if (x%i==0)
        {
            if(x/i==i) c++;
            else c+=2;
        }
    }

    arr[x]=c;
    return c;
}

int main()
{
    long long a,b,c,mx,sum=0;
    cin >> a >> b >> c;
    for (int i=1; i<=a; i++)
    {
        for (int j=1; j<=b; j++)
        {
            for (int k=1; k<=c; k++)
            {
                if (arr[i*j*k]!=0) sum = ((sum%1073741824) + (arr[i*j*k]%1073741824))%1073741824;
                else sum = ((sum%1073741824)+(div(i*j*k)%1073741824))%1073741824;
            }
        }
    }
    cout << sum << endl;

    return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <queue>
#include <limits.h>
#define mod  1073741824
using namespace std;

int main()
{
    long long int n,a,b,c,sum = 0,p[1000009]={0};
    for (int i = 1; i < 1001; ++i)
    {
        p[i*i]++;
        for (int j = i*i+i; j < 1000007; j += i)
        {
            p[j] += 2;
        }
    }
    scanf("%d%d%d",&a,&b,&c);
    for (int i = 1; i <= a; ++i)
    {
        for (int j = 1; j <= b; ++j)
        {
            for (int k = 1; k <= c; ++k)
            {
                sum += p[i*j*k];
            }
        }
    }
    cout << sum % 1073741824;
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAXM 2020
#define MAXN 4040404
#define MOD 1073741824
int n1, n2, n3, n, n0;
int prime[MAXM], pnum = 0;
int d[MAXN], p[MAXN], cnt[MAXN], m[MAXN], rm[MAXN];
unsigned f[MAXM * 10][MAXM], ans = 0;
int g[MAXM * 10][MAXM], num[MAXM * 10];
class Edge
{
	public:
		int to, next;
};
Edge e[MAXN];
int head[MAXN], need[MAXN], edgenum = 0, st = 0;
void init()
{
	memset(p, 0, sizeof(p));
	d[1] = 1;
	rm[1] = 0;
	for(int i = 2; i <= n; i++)
	{
		if(!p[i] && i <= n0)
		{
			prime[++pnum] = i;
			p[i] = m[i] = i;
			cnt[i] = rm[i] = 1;
			d[i] = 2;
		}
		else if(!p[i])
			continue;
		for(int j = 1; j <= pnum && prime[j] < p[i] && (long long)i * prime[j] <= n; j++)
		{
			int now = i * prime[j];
			p[now] = m[now] = prime[j];
			cnt[now] = 1;
			rm[now] = i;
			d[now] = d[i] * 2;
		}
		if((long long)i * p[i] <= n)
		{
			int now = i * p[i];
			p[now] = p[i];
			m[now] = m[i] * p[i];
			cnt[now] = cnt[i] + 1;
			rm[now] = rm[i];
			d[now] = d[i] / cnt[now] * (cnt[now] + 1);
		}
	}
}
inline void insert(int u, int v)
{
	e[++edgenum].to = v;
	e[edgenum].next = head[u];
	head[u] = edgenum;
}
unsigned getf(int u, int i)
{
	if(g[u][i] == num[u])
		return f[u][i];
	g[u][i] = num[u];
	return f[u][i] = getf(u - 1, i) * (cnt[num[u]] + 1) - getf(u - 1, i / p[num[u]]) * cnt[num[u]];
}
void dfs(int v)
{
	ans += getf(st, n3) * need[v];
	for(int i = head[v]; i; i = e[i].next)
	{
		num[++st] = e[i].to;
		f[st][0] = 0;
		g[st][0] = e[i].to;
		f[st][1] = d[e[i].to];
		g[st][1] = e[i].to;
		dfs(e[i].to);
		st--;
	}
}
int main()
{
	scanf("%d%d%d", &n1, &n2, &n3);
	n = max(n1 * n2, n3);
	n0 = max(max(n1, n2), n3);
	init();
	memset(head, 0, sizeof(head));
	memset(need, 0, sizeof(need));
	memset(g, 0, sizeof(g));
	for(int i = 1; i <= n1; i++)
		for(int j = 1; j <= n2; j++)
			if(!need[i * j]++)
				insert(rm[i * j], i * j);
	f[0][0] = 0;
	num[0] = 1;
	g[0][0] = 1;
	for(int i = 1; i <= n3; i++)
		f[0][i] = f[0][i - 1] + d[i], g[0][i] = 1;
	dfs(1);
	printf("%u\n", ans % MOD);
	return 0;
}

#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;

const int Lim = 2000;
const int maxN = 2005;
const int mod = (1<<30);

int primes, prime[maxN], u[maxN], g[maxN];
bool flag[maxN];
int a, b, c;

void init(){
	primes = 0;
	u[1] = 1;
	for (int i=2; i<=Lim; i++){
		if (!flag[i]){
			prime[++primes] = i;
			u[i] = -1;
		}
		for (int j=1; j<=primes && prime[j]*i<=Lim; j++){
			if (i%prime[j] == 0){
				flag[i*prime[j]] = 1;
				u[i*prime[j]] = 0;
				break;
			}
			flag[i*prime[j]] = 1;
			u[i*prime[j]] = -u[i];
		}
	}

	for (int i=1; i<=Lim; i++){
		for (int j=1; j<=i; j++) g[i] += i/j;
	}
}

int gcd(int x, int y){
	if (y == 0) return x;
	return gcd(y, x%y);
}

int lcm(int x, int y){
	int gg = gcd(x, y);
	return x*y/gg;
}

void Solve(){
	long long ans = 0;
/*
	for (int x=1; x<=a; x++)
		for (int y=1; y<=b; y++)
			for (int z=1; z<=c; z++)
				for (int i=1; i<=a/x; i++)
				if (gcd(i, y*z) == 1)
					for (int j=1; j<=b/y; j++)
					if (gcd(j, z) == 1) ans += c/z;

	*/

	for (int i=1; i<=a; i++) if (u[i])
		for (int j=1; i*j<=b; j++) if (u[j])
			for (int k=1; k<=a && k<=c; k++) if (u[k]){
				int t1 = lcm(i, k), t2 = lcm(j, k);
				if (t1 > a || t2 > c) continue;
				ans += u[i]*u[j]*u[k]*g[a/t1]*g[c/t2]*g[b/i/j];
				ans %= mod;
			}

	ans = (ans+mod)%mod;
	cout<<ans<<endl;
}

int main(){
	scanf( "%d%d%d\n", &a, &b, &c );
	init();
	Solve();
	return 0;
}

#include "bits/stdc++.h"
#define PRECISION(x) cout << fixed << setprecision(x)
#define FAST_IO ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define SZ(X) ((LL)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define ALLR(X) (X).rbegin, (X).rend()
#define DRI(X) int (X); cin >> X
#define DRII(X, Y) int X, Y; cin >> X >> Y
#define DRIII(X, Y, Z) int X, Y, Z; cin >> X >> Y >> Z
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define readV(X) for(int &ele : (X)) cin >> ele
#define readVI(X) for(int idx = 1; idx < SZ((X)); ++idx) cin >> (X)[idx]
#define REP(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define F first
#define S second

using namespace std;
template<class T> void max_self(T & a, const T & b) { if(a < b) a = b; }
template<class T> void min_self(T & a, const T & b) { if(a > b) a = b; }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}
template<typename... Args>
void read(Args&... args)
{
    ((cin >> args), ...);
}

template<typename... Args>
void write(Args... args)
{
    ((cout << args), ...);
}
typedef long long LL;
const int INF = 1e9 + 7;

int main(){
    FAST_IO
    #ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif

    LL a, b, c, mod = (1 << 30), total = 0;
    read(a, b, c);
    unordered_map<LL, LL> cnt;
    for(LL o = 1; o <= a; ++o){
        for(LL p = 1; p <= b; ++p){
            for(LL q = 1; q <= c; ++q){
                cnt[o * p * q]++;
            }
        }
    }

    auto getD = [&](LL val){
        LL divC = 1;
        for(LL p = 2; p <= val; ++p){
            if(val < p) break;
            LL cnt = 0;
            while(val % p == 0){
                cnt++;
                val /= p;
            }
            divC *= (cnt + 1);
        }
        return divC;
    };

    for(auto ele : cnt){
        total = (total + ele.S * getD(ele.F)) % mod;
    }

    write(total, "\n");
}

#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e3 + 1, maxm = (int)9e3 + 1;
int A, B, C, mx, mu[maxn], f[maxn], g[maxn], h[maxn];
int cnt, ord[maxn], rnk[maxn], tot, lnk[maxn], pos[maxn];
struct Edge {
	int nxt, v, idx;
} e[maxm];
int main() {
	scanf("%d%d%d", &A, &B, &C);
	mx = max(A, max(B, C));
	for(int i = 1; i <= mx; ++i) {
		f[i] = A / i;
		g[i] = B / i;
		h[i] = C / i;
	}
	++mu[1];
	for(int i = 1; i <= mx; ++i)
		for(int j = i + i; j <= mx; j += i) {
			mu[j] -= mu[i];
			f[i] += f[j];
			g[i] += g[j];
			h[i] += h[j];
		}
	for(int i = 1; i <= mx; ++i) if(mu[i]) {
		ord[++cnt] = i;
		for(int x = i + i; x <= mx; x += i) if(mu[x])
			for(int y = i, j = x; y < x && j <= mx; y += i, j += x) if(mu[j] && (f[j] || g[j] || h[j])) {
				++rnk[x];
				++rnk[y];
			}
	}
	sort(ord + 1, ord + cnt + 1, [&](int const &u, int const &v) {
		return rnk[u] < rnk[v] || (rnk[u] == rnk[v] && u < v);
	});
	for(int i = 1; i <= cnt; ++i)
		rnk[ord[i]] = i;
	for(int i = 1; i <= mx; ++i) if(mu[i])
		for(int x = i + i; x <= mx; x += i) if(mu[x])
			for(int y = i, j = x; y < x && j <= mx; y += i, j += x) if(mu[j] && (f[j] || g[j] || h[j])) {
				int u = x, v = y;
				if(rnk[u] < rnk[v])
					swap(u, v);
				e[++tot] = (Edge){lnk[u], v, j};
				lnk[u] = tot;
			}
	int ans = 0;
	for(int o = cnt; o >= 1; --o) {
		int i = ord[o];
		for(int it = lnk[i]; it; it = e[it].nxt)
			pos[e[it].v] = e[it].idx;
		ans += f[i] * g[i] * h[i] * mu[i];
		for(int it = lnk[i]; it; it = e[it].nxt) {
			int j = e[it].v, idx1 = e[it].idx;
			ans += f[idx1] * g[idx1] * (h[i] * mu[j] + mu[i] * h[j])
				+ (f[idx1] * (g[i] * mu[j] + mu[i] * g[j])
					+ (f[i] * mu[j] + mu[i] * f[j]) * g[idx1]) * h[idx1];
			for(int jt = lnk[j]; jt; jt = e[jt].nxt) {
				if(!pos[e[jt].v])
					continue;
				int k = e[jt].v, idx2 = e[jt].idx, idx3 = pos[k];
				ans += ((f[idx1] * g[idx2] + f[idx2] * g[idx1]) * h[idx3]
					+ (f[idx1] * g[idx3] + f[idx3] * g[idx1]) * h[idx2]
					+ (f[idx2] * g[idx3] + f[idx3] * g[idx2]) * h[idx1]) * mu[i] * mu[j] * mu[k];
			}
		}
		for(int it = lnk[i]; it; it = e[it].nxt)
			pos[e[it].v] = 0;
	}
	printf("%d\n", ans & ((1 << 30) - 1));
	return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
#include <cstdlib>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <ctime>
#include <cassert>
#include <list>
#include <bitset>
using namespace std;
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define forit(v,it) for(typeof(v.begin()) it = v.begin(); it != v.end(); ++it)
typedef long long ll;
typedef pair <int, int> pii;
typedef vector <int> vi;

const int N = (1<<30) - 1;
int a,b,c;
int gcd[2005][2005];

inline bool sq_free(int n) {
	int j;
	for(int i=2;(j = i*i) <= n;++i) if(n%j == 0)
		return false;
	return true;
}

inline int sign(int n) {
	int cnt = 0;
	for(int i=2;i*i<=n;++i) if(n%i == 0) {
		cnt++;
		n /= i;
	}
	if(n > 1) cnt++;

	if(cnt&1) return -1;
	return 1;
}

inline int calc(int x,int n) {
	int res = 0;
	for(int i=1;i<=n;++i) if(gcd[x][i] == 1)
		res += n/i;
	return res;
}

int main () {
	#ifdef LOCAL
	freopen("in","r",stdin);
	freopen("out","w",stdout);
	#endif

	scanf("%d%d%d",&a,&b,&c);

	for(int i=1;i<=2000;++i)
		gcd[i][0] = i;

	for(int i=1;i<=2000;++i)
		for(int j=i;j<=2000;++j)
			gcd[i][j] = gcd[j][i] = gcd[i][j%i];

	int res = 0;
	for(int j=1;j<=2000;++j) if(sq_free(j)) {
		int sq = sign(j);
		for(int i=1;i<=a;++i) if(gcd[i][j] == 1)
			res = (res + 1LL*sq*(a/i)*calc(i,b/j)*calc(i,c/j))&N;
	}

	cout<<res;

	return 0;
}

#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define ull unsigned long long
#define mod 1073741824
using namespace std;

int main()
{
   int a,b,c ;
   cin>>a>>b>>c;
   ll ans=0 ;
   for(int i=1 ; i<=a  ;i++)
   {
       for(int j=1 ; j<=b ;j++)
       {
           for(int k=1 ; k<=c;k++)
           {
               int u =i*j*k ;
               int cnt=0 ;
               for(int y=1 ; y*y<u; y++)if(u%y==0)cnt++ ;
               cnt*=2 ;
               int s=sqrt(u);
               if(s*s==u)cnt++ ;
               ans+=cnt ;
               ans%=mod;
           }
       }
   }
   cout<<ans;
    return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;
const int N = 2005;
int mu[N], prime[N], rec[N][N];
bool pd[N];
inline void make_mu() {
	int sz = 0;
	mu[1] = 1;
	for (int i = 2; i < N; i ++) {
		if (!pd[i]) {
			mu[i] = -1;
			prime[++ sz] = i;
		}
		for (int j = 1; j <= sz; j ++) {
			if (i * prime[j] >= N) break;
			pd[i * prime[j]] = 1;
			if (i % prime[j] == 0) mu[i * prime[j]] = 0;
			else mu[i * prime[j]] = -mu[i];
		}
	}
}
inline int gcd(int x, int y) {
	return y == 0 ? x : gcd(y, x % y);
}
inline int getgcd(int x, int y) {
	if (rec[x][y]) return rec[x][y];
	rec[x][y] = gcd(x, y);
	return rec[x][y];
}
inline int cal(int ub, int base, int k) {
	int ret = 0;
	for (int i = base; i <= ub; i += base)
		if (getgcd(i, k) == 1) ret += (ub / i);
	return ret;
}
int main() {
	make_mu();
	int a, b, c, ans = 0;
	scanf("%d%d%d", &a, &b, &c);
	for (int i = 1; i <= c; i ++)
		for (int d = 1; d <= a; d ++)
			if (mu[d] != 0) ans = (ans + (c / i) * mu[d] * cal(a, d, i) * cal(b, d, i)) % 1073741824;
	printf("%d\n", ans);
}

#include <bits/stdc++.h>
using namespace std;

#define N 100005
#define mod 1000000007

// To store the number of divisors
int cnt[N];

// Function to find the number of divisors
// of all numbers in the range 1 to n
void Divisors()
{
	memset(cnt, 0, sizeof cnt);

	// For every number 1 to n
	for (int i = 1; i < N; i++) {

		// Increase divisors count for every number
		for (int j = 1; j * i < N; j++)
			cnt[i * j]++;
	}
}

// Function to find the sum of divisors
int Sumofdivisors(int A, int B, int C)
{
	// To store sum
	int sum = 0;

	Divisors();

	for (int i = 1; i <= A; i++) {
		for (int j = 1; j <= B; j++) {
			for (int k = 1; k <= C; k++) {
				int x = i * j * k;

				// Count the diviosrs
				sum += cnt[x];
				if (sum >= mod)
					sum -= mod;
			}
		}
	}

	return sum;
}

// Driver code
int main()
{

	int A = 5, B = 6, C = 7;

	// Function call
	cout << Sumofdivisors(A, B, C);

	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include <bits/stdc++.h>
#include <vector>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define int         long long
#define ll          long long
#define ld	    long double
#define pb          push_back
#define pp	    pop_back()
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define vii         vector<pii>
#define mi          map<ll,ll>
#define mii         map<pii,ll>
#define mp          make_pair
#define all(a)      (a).begin(),(a).end()
#define rall(a)     (a).rbegin(),a.rend()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define endl        '\n'
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define repj(j,a,b) for(ll j=a;j<b;j++)
#define lexistr(x,y)      lexicographical_compare(x.begin(),x.end(),y.begin(),y.end())
#define IOS	    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef tree<ll,null_type,less<ll>,rb_tree_tag, tree_order_statistics_node_update> indexed_set;

//CONSTANTS----------------------------------
#define PI 	    3.141592653589793238462643
const ll hell=1073741824 ;
const ll mod=1000000007;
//CODE------------------------------------------
ll countdiv(ll n)
{
    ll cnt=0;
    for(ll i=1;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {
            if(n/i==i) cnt++;
            else cnt+=2;
        }
    }
    return cnt;
}
ll solve()
{
    ll a,b,c; cin>>a>>b>>c;
    ll ans=0;
    ll ar[1000002];
    vi v;
    rep(i,1,a+1)
    {
        rep(j,1,b+1)
        {
            rep(k,1,c+1)
            {
                ll x=i*j*k;
                if(ar[x]!=0)
                    ans= (ans+ar[x])%hell;
                else
                {
                    ll y=countdiv(x);
                    ans=(ans+y)%hell;
                    ar[x]=y;
                }
            }
        }
    }
    /*rep(i,0,sz(v))
    {
        ans+= countdiv(v[i])%hell;
    }*/
    cout<<ans%hell;
}
//MAIN------------------------------------------
signed main(){
    IOS
    #ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
    #endif
    int t=1;
    //cin>>t;
    while(t--) {
        solve();
        cout<<endl;
    }
    return 0;
}

#include <iostream>
#include <cstdio>

#define N 1000006
#define mod 1073741824

using namespace std;

long long arr[N];

void fun(){
	arr[1]=1;
	for(long long i=2; i<=N; i++) arr[i]=1;
	for(long long  i=2; i<=N/2; i++){
		for(long long j=i; j<=N; j+=i){
			arr[j]++;
		}
	}
}

int main()
{
	fun();
	int a,b,c;
	while(cin>>a>>b>>c){
		long long sum=0;
		for(int i=1; i<=a; i++){
			for(int j=1; j<=b; j++){
				for(int k=1; k<=c; k++){
					sum=(sum+arr[i*j*k])%mod;
				}
			}
		}
		cout<<sum<<endl;
	}
	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>

using namespace std;

typedef long long ll;

vector<int> pier;
const ll MOD = (1 << 30);
const int P = 10000;
unordered_map<ll, ll> M;
vector< vector<int> > ile(2001, vector<int>(350, 0));

ll f(int nr, int a, int b, int c)
{
    if (nr == pier.size())
        return 1;
    ll hasz = ((nr * P + a) * P + b) * P + c;
    if (M.find(hasz) != M.end())
        return M[hasz];
    ll w = 0;
    for (int i = 0, tA = 1; i <= ile[a][nr]; ++i, tA *= pier[nr])
        for (int j = 0, tB = 1; j <= ile[b][nr]; ++j, tB *= pier[nr])
            for (int k = 0, tC = 1; k <= ile[c][nr]; ++k, tC *= pier[nr])
                w = (w + f(nr + 1, a / tA, b / tB, c / tC) * (i + j + k + 1)) % MOD;
    M[hasz] = w;
    return w;
}

int main()
{
    ios_base::sync_with_stdio(0);
    int a, b, c;
    cin >> a >> b >> c;
    for (int i = 2; i <= 2000; ++i)
    {
        bool ok = true;
        for (int j = 2; j < i; ++j)
            if (i % j == 0)
                ok = false;
        if (ok)
            pier.push_back(i);
    }
    reverse(pier.begin(), pier.end());
    for (int i = 2; i <= 2000; ++i)
    {
        for (int j = 0; j < pier.size(); ++j)
        {
            int pot = 1;
            while (pot <= i)
            {
                pot *= pier[j];
                ++ile[i][j];
            }
            --ile[i][j];
        }
    }
    cout << f(0, a, b, c);
    return 0;
}

/*I Believe Whatever Doesn't Kill You Simply Makes You Stranger*/
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <string>
#include <vector>
#include<set>
#include <deque>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <sstream>
#include<utility>
#include <stdio.h>
#define se second
#define fi first
#define pb push_back
#define pi 3.14159265358979323846264338
#define MIN(a,b) (((a)<(b)) ? a : b)
#define MAX(a,b) (((a)>(b)) ? a : b)
#define lp(x,n)for(int i=0; i<n; i++)
#define lop(x,n)for(int i=n; i>=0; i--)
#define ull unsigned long long
#define ld long double
#define ll long long
#define w while
#define ret return
#define SORT(a) a.begin(),a.end()
 /*
                 _                               _
                | |                             | |
 _ __ ___   __ _| |__  _ __ ___   ___  _   _  __| |
| '_ ` _ \ / _` | '_ \| '_ ` _ \ / _ \| | | |/ _` |
| | | | | | (_| | | | | | | | | | (_) | |_| | (_| |
|_| |_| |_|\__,_|_| |_|_| |_| |_|\___/ \__,_|\__,_|

i like this job i like it !
*/
using namespace std;
ll num_div(ll n){
	ll Co(00); //cin >> n;
	for (ll i = 1; i*i <= n; i++){
		if (n%i == 0){
			//cout << i << " " << n / i << "\n";
			if (i != n / i){
				Co += 2;
			}
			else
				//cout << i << "\n";
			Co++;
		}
	}
	ret Co;
}
int main(){
vector<ll>V;
ll n, m, x, up(0), len(0), f(0), test[100001] = { 0 },f2(0); cin >> n >> m >> x;
	for (ll i = 1; i<=n; i++){
		for (ll j = 1; j<=m; j++){
			for (ll k = 1;k<=x; k++){
			//	cout << i << " " << j << " " << k <<" " << i*j*k<<" " << "\n";
					up = i*j*k;
						test[up]++;
				}
			}
		}
	for (int i = 1; i <= 10000; i++){
		if (test[i] != 0){
			f = num_div(i);
			f2 += (f*test[i]);
			f2 % 1073741824;
		}
	}	cout << f2 << "\n";
	/*lp(i=1, (n*m*x)+1){
		if (i != 0)
		f = num_div(i);
		cout << f << " ";
	}*/

	//cout << f % 1073741824 << "\n";
		ret 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>

template <typename Tp>Tp Max(const Tp &a, const Tp &b) {return a > b ? a : b;}
template <typename Tp>Tp Min(const Tp &a, const Tp &b) {return a < b ? a : b;}

template <typename Tp>void Read(Tp &x) {
    Tp in = 0, f = 1; char ch = getchar();
    while(ch<'0' || ch>'9') {if(ch=='-') f = -1; ch = getchar();}
    while(ch>='0' && ch<='9') {in = in*10+ch-'0'; ch = getchar();}
    x = in*f;
}

typedef long long LL;

const int SN = 2000 + 10;

const int MOD = 1073741824;

LL prime[SN], mu[SN], cnt;

LL g[SN][SN];

bool vis[SN];

void pre() {
    int limits = SN - 10;

    mu[1] = 1;

    for(int i = 2; i <= limits; i++) {
	if(!vis[i]) prime[++cnt] = i, mu[i] = -1;

	for(int j = 1; j <= cnt && i * prime[j] <= limits; j++) {
	    vis[i * prime[j]] = 1;

	    if(i % prime[j] == 0) {
		mu[i * prime[j]] = 0;
		break ;
	    }

	    mu[i * prime[j]] = mu[i] * mu[prime[j]];
	}
    }
}

void MIN(LL &a, LL &b, LL &c) {
    if(b > a) std::swap(a, b);
    if(c > a) std::swap(a, c);
    if(c > b) std::swap(b, c);
}

int gcd(int a, int b) {
    if(!b) {
	g[a][b] = a;
	return a;
    }
    if(g[a][b]) return g[a][b];
    g[a][b] = gcd(b, a%b);
    return g[a][b];
}

LL calc(LL limits, LL d, LL k) {

    LL res = 0;

    for(int i = 1; i <= limits / d; i++)
	if(g[k][d * i] == 1) res = (res + (limits / (1LL * d * i))) % MOD;

    return res;
}

LL a, b, c;

int main() {
    pre();

    Read(a), Read(b), Read(c);

    MIN(a, b, c);

    for(int i = 1; i <= a; i++)
	for(int j = 1; j <= b; j++)
	    g[i][j] = gcd(i, j);

    LL ans = 0;

    for(int k = 1; k <= c; k++)
	for(int d = 1; d <= a; d++) {
	    ans = (ans + mu[d] * (c / k) % MOD * calc(a, d, k) % MOD * calc(b, d, k) % MOD) % MOD;
	}

    printf("%I64d\n", ans);

    return 0;
}

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<iostream>
#include<algorithm>
using namespace std;
typedef __int64 i64;
const int mod=1073741824;

int num[1000005];
int main()
{
    int a,b,c,i,j,k;
    scanf("%d%d%d",&a,&b,&c);
    for(i=1;i<=1000005/2;i++) num[i]=1;
    for(i=1;i<=1000005/2;i++)
    for(j=i<<1;j<=1000005;j+=i) num[j]++;

    int ans=0;
    for(i=1;i<=a;i++)
    for(j=1;j<=b;j++)
    for(k=1;k<=c;k++)
    {
        int x=i*j*k;
        ans=(ans+num[x])%mod;
    }
    printf("%d\n",ans);
}

#include<bits/stdc++.h>

#define x first
#define y second
#define pb push_back
#define inf 0x3f3f3f3f
#define mod 1000000007
#define sq(x) ((x)*(x))
#define bit(x, y) (((x)>>(y))&1)
#define bctz(x) (__builtin_ctz(x))
#define bclz(x) (__builtin_clz(x))
#define bclzl(x) (__builtin_clzl(x))
#define bctzl(x) (__builtin_ctzl(x))
#define bpt(x) (__builtin_popcount(x))
#define bptl(x) (__builtin_popcountll(x))
#define PQ priority_queue<pii, vector<pii>, greater<pii> >
#define eps 1e-8
#define squ(a, b) (a)*(a)+(b)*(b)
#define pi 3.1415926535897932384626433832795

using namespace std;

typedef double DO;
typedef long double LD;
typedef long long INT;
typedef pair<int, int> pii;
typedef pair<pii, int> pi3;
typedef vector<int> VI;

template<typename T, typename U> inline void smin(T &a, const U &b) {if(a>b) a=b;}
template<typename T, typename U> inline void smax(T &a, const U &b) {if(a<b) a=b;}

template <class T> inline void gn(T &x) {char c, sg=0; while(c=getchar(), (c>'9' || c<'0') && c!='-'); for((c=='-' ? sg=1, c=getchar() : 0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0'; if(sg) x=-x;}
template <class T1, class T2> inline void gn(T1 &x1, T2 &x2) {gn(x1), gn(x2);}
template <class T1, class T2, class T3> inline void gn(T1 &x1, T2 &x2, T3 &x3) {gn(x1, x2), gn(x3);}
template <class T1, class T2, class T3, class T4> inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {gn(x1, x2, x3), gn(x4);}
template <class T1, class T2, class T3, class T4, class T5> inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5) {gn(x1, x2, x3, x4), gn(x5);}

template <class T> inline void print(T x) {if(x<0) {putchar('-'); return print(-x);} if(x<10) {putchar('0'+x); return ;} print(x/10); putchar(x%10+'0');}
template <class T> inline void println(T x) {print(x); putchar('\n');}
template <class T> inline void printsp(T x) {print(x); putchar(' ');}
template <class T1, class T2> inline void print(T1 x1, T2 x2) {printsp(x1), println(x2);}
template <class T1, class T2, class T3> inline void print(T1 x1, T2 x2, T3 x3) {printsp(x1), printsp(x2), println(x3);}
template <class T1, class T2, class T3, class T4> inline void print(T1 x1, T2 x2, T3 x3, T4 x4) {printsp(x1), printsp(x2), printsp(x3), println(x4);}
template <class T1, class T2, class T3, class T4, class T5> inline void print(T1 x1, T2 x2, T3 x3, T4 x4, T5 x5) {printsp(x1), printsp(x2), printsp(x3), printsp(x4), println(x5);}

int power(int a, int b, int m, int ans=1) {
	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;
	return ans;
}

#define MOD 1<<30

int p[100], num, nn;
INT sum;

int pre(){
	int j;
	for(int i=2; i<100; i++){
		for(j=2; j<i; j++){
			if(i%j==0)	break;
		}
		if(i==j)	p[num++]=i;
	}
}

int f(int n){
	int N=1;
	for(int i=0; i<num; i++){
		nn=0;
		while(n%p[i]==0){
			nn++;
			n/=p[i];
		}
		N*=nn+1;
	}

	return N;
}

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	int a, b, c;
	gn(a, b, c);
	for(int i=1; i<=a; i++){
		for(int j=1; j<=b; j++){
			for(int k=1; k<=c; k++){
				sum+=f(i*j*k);
				sum%=MOD;
			}
		}
	}

	println(MOD);

	return 0;
}

//BISMILLAHIR RAHMANIR RAHEEM
//ALLAH IS WATCHING ME
// Allah amader korona virus theke rokkha korun.Amin.

//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp> //order_of_key return number of elements less than x, find_by_order return index (pointer use kora lgbe)

using namespace std;
using namespace __gnu_pbds;

#define ull    unsigned long long
#define ll    long long
#define ios    ios::sync_with_stdio(0);cin.tie(0);
#define ses   "\n"
#define all(x) (x).begin(), (x).end()
//#define INF   ((int)2e18)
#define ii pair<ll, ll>

string digit="0123456789";
string small="abcdefghijklmnopqrstuvwxyz";
string capital="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1}; // 8-direction.......
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int dx4[]= {1,-1,0,0}; // 4-direction...........
int dy4[]= {0,0,1,-1};

const int N=1e6+5;
const ll M=1e18;

typedef tree< ll, null_type, less<ll>, rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef tree<pair<ll, ll>,null_type,less<pair<ll, ll>>,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset;

struct Edge
{
    int u, vv;
    bool operator<(Edge const& other)
    {
        return vv > other.vv;
    }
}; // eta joss jinis.krsukal er jnno and sort 1 out of 3 or more er jnno better

/////////////////////////////////////////////////////////////////////////////

ll div(ll n)
{
                ll cnt=0;
    for(ll i=1; i*i<n; i++)
    {
        if(n%i==0)
            cnt+=2;
    }
    if(sqrt(n)*sqrt(n)==n)
        cnt++;
    return cnt;
}

////////////////////////////////////////////////////////////////////////////
//main function is here.........
int main()
{
    //ios
    ll a,b,c,sum=0;
    cin>>a>>b>>c;
    for(ll i=1; i<=a; i++)
    {
        for(ll j=1; j<=b; j++)
        {
            for(ll k=1; k<=c; k++)
            {
                sum+=div(i*j*k);
                sum%=1073741824;
            }
        }
    }
    cout<<sum;
}

/*
*/

//Alhamdulillah

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
#define help freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)

int fn(int x)
{
    int cnt = 2;
    for (int i = 2; i * i <= x; i++)
    {
        if (x % i == 0)
        {
            if (x / i == i)
                cnt++;
            else
                cnt = cnt + 2;
        }
    }
    return cnt;
}

int main()
{

    int mod = 1073741824;
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    int sum = 0;
    for (int i = 1; i <= a; ++i)
    {
        for (int j = 1; j <= b; ++j)
        {
            for (int k = 1; k <= c; ++k)
            {
                int x = i * j * k;
                sum = sum + fn(x);
                if (sum >= mod)
                    sum = sum % mod;
            }
        }
    }
    printf("%d\n", sum);

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d,i,j,k,l,t;
    cin>>a>>b>>c;
    long long sum=0;
    long long n,div[1000001];
    t=0;
    for(i=1;i<1000001;i++){
        for(j=i;j<1000001;j+=i){
           div[j]++;
        }
    }
    for(i=1;i<=a;i++){
        for(j=1;j<=b;j++){
            for(k=1;k<=c;k++){
               d=i*j*k;
               sum=sum+div[d];
            }
        }
    }
    n=sum%1073741824;
    cout<<n<<endl;
    return 0;

}

#include<iostream>
#include<cmath>
using namespace std;

int a[1000005];

int main(){
	int x,y,z;
	for(int i=1;i<=100000;i++){
		int k=1,cnt=0;;
		for(int j=2;j<=sqrt(i);j++){
			if(i%j==0){
				a[i]++;
				cnt++;
			}
			if(i%j==0 && j==sqrt(i))k--;
		}
		a[i]+=2+cnt-(k==1?0:1);
	}
	int ans=0;
	cin >> x >> y >> z;
	for(int i=1;i<=x;i++){
		for(int j=1;j<=y;j++){
			for(int k=1;k<=z;k++){
				ans+=a[i*j*k];
			}
		}
	}
	cout << ans-1;
	return 0;
}

#include<bits/stdc++.h>
#include<stdio.h>
#include <string>
using namespace std;

int main()
{

    long long i,j,k,sum=0,a,b,c;
    long long arr[1000007];
    for(i=1;i<1000005;i++)
    {
        for(j=i;j<1000005;j=j+i)
        {arr[j]++;}
    }

cin>>a>>b>>c;
for(int i=1;i<=a;i++)
{
    for(int j=1;j<=b;j++)
    {
        for(int k=1;k<=c;k++)
        {
            sum+=arr[i*j*k];

        }
    }
}
cout<<sum;

}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cstdlib>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
const int base=1<<30;
#define maxn 1000000
#define For(i,a,b) for(int i=a;i<=b;i++)
#define DFor(i,a,b) for(int i=a;i>=b;i--)
#define reset(c,val) memset(c,val,sizeof(c))
using namespace std;
int a,b,c;
long int res,f[maxn];
int main()
{
    scanf("%d%d%d",&a,&b,&c);
    For(i,1,maxn) for(int j=i;j<=maxn;j+=i) f[j]++;
    For(i,1,a) For(j,1,b) For(k,1,c) res=(res+f[i*j*k])%base;
    cout<<res<<endl;
    //system("pause");
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const ll MOD = 1 << 30;
const int PI = 303;
vector<int> ps;
int prime[2001];
map<ll, int> dp;

ll to(int a, int b, int c, int i) {
	return 1000000000000LL*a + 100000000LL*b + 10000LL*c + i;
}

int solve(int a, int b, int c, int i) {
	int p = ps[i];
	if(i == PI || (a < p && b < p && c < p))
		return 1;
	if(a < p)
		a = 1;
	if(b < p)
		b = 1;
	if(c < p)
		c = 1;
	int M = max({a, b, c}), m = min({a, b, c});
	b = a + b + c - m - M;
	a = m;
	c = M;
	int X = to(a, b, c, i);
	if(dp.count(X))
		return dp[X];
	int ans = 0;
	vector<int> pq = {1};
	while(pq.back() < 2000)
		pq.push_back(p*pq.back());
	int qa = 1, qb, qc, ea = 0, eb, ec;
	while(qa <= a) {
		qb = 1, eb = 0;
		while(qb <= b) {
			qc = 1, ec = 0;
			while(qc <= c) {
				ans = (ans + (ll)(ea + eb + ec + 1) * (ll)solve(a/qa, b/qb, c/qc, i + 1)) % MOD;
				qc *= p;
				ec++;
			}
			qb *= p;
			eb++;
		}
		qa *= p;
		ea++;
	}
	return dp[X] = ans;
}

void sieve() {
	for(int p = 2; p <= 2000; p++) {
		if(prime[p])
			continue;
		ps.push_back(p);
		for(int q = p; q <= 2000; q += p)
			prime[q] = p;
	}
}

int main() {
	sieve();
	int a, b, c;
	cin >> a >> b >> c;
	int x = solve(a, b, c, 0);
	cout << (x % MOD + MOD) % MOD << '\n';
	//cout << dp.size() << endl;
}

/**
*   Bismillahir Rahmanir Rahim.
*   Imtiaz_rafi
*   PCIU, CHITTAGONG
**/
#include<bits/stdc++.h>
using namespace std;
#define speed ios::sync_with_stdio(0);cin.tie(0);
#define rep(i,a) for(ll i=0;i<a;i++)
#define rep1(i,begin,end) for(ll i=begin;i<=end;i++)
#define all(v)   v.begin(),v.end()
#define pb push_back
#define pf push_front
#define mp make_pair
#define pi acos(-1)
// bitshift (1LL<<(3)) *2^3
typedef long long int ll;
typedef vector<ll>vi;
typedef map<ll,ll>m;
typedef map<char,ll>mc;
typedef set<ll>st;
typedef set<char>sc;
const ll mx  = 1e6;
ll x[mx];
int main()
{
    speed;
    ll t,i,a,b,d=0,e=0,ans=0,sum=0,j,k,c;

    for(i=1;i<=100000;i++)
        for(j=i;j<=100000;j+=i)
            x[j]++;

    cin>>a>>b>>c;

    for(i=1;i<=a;i++)
    {
        for(j=1;j<=b;j++)
        {
            for(k=1;k<=c;k++)
            {
                sum+=x[i*j*k]%1073741824;
                //cout<<i<<" "<<j<<" "<<k<<endl;
                //cout<<x[i*j*k]<<endl;
            }
        }
        //cout<<sum%<<endl;
    }
    cout<<sum%1073741824<<endl;
}

#include <bits/stdc++.h>
#define xx first
#define yy second
#define mp make_pair
#define pb push_back
#define mset(x, y) memset(x, y, sizeof x)
#define mcpy(x, y) memcpy(x, y, sizeof x)
using namespace std;

typedef long long LL;
typedef pair <int, int> pii;

inline int Read()
{
	int x = 0, f = 1, c = getchar();
	for (; !isdigit(c); c = getchar())
		if (c == '-')
			f = -1;
	for (;  isdigit(c); c = getchar())
		x = x * 10 + c - '0';
	return x * f;
}

const int MAXN = 2005;

int a, b, c, mu[MAXN];
LL ans;

inline int F(int x, int y)
{
	int ret = 0;
	for (int i = 1; i <= y; i ++)
		if (__gcd(i, x) == 1)
			ret += y / i;
	return ret;
}

int main()
{
#ifdef wxh010910
	freopen("data.in", "r", stdin);
#endif
	a = Read(), b = Read(), c = Read(), mu[1] = 1;
	for (int i = 1; i <= a; i ++)
		for (int j = i + i; j <= a; j += i)
			mu[j] -= mu[i];
	for (int i = 1; i <= a; i ++)
		for (int x = 1; x <= b; x ++)
			if (__gcd(i, x) == 1)
				ans += 1LL * mu[x] * (a / i) * F(i, b / x) * F(i, c / x);
	return printf("%d\n", ans & (1 << 30) - 1), 0;
}

#include <bits/stdc++.h>

#define INF 1000000005
#define FOR(i, a, b) for(int i=int(a); i<int(b); i++)
#define pb push_back
#define endl '\n'
#define PI 3.14159265358979323846

using namespace std;

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;

#define MOD 1073741824//1000000007
#define maxN 1000005
#define EPS 0.00009

ll n, m, k, y, a, b, c;
ll A[maxN], B[maxN];

int fr[maxN];

int main() {

    //ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);

    int primes[25] = {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};
    int exp[101][25];

    FOR(i,1,101){
        int aux = i;

        for(int j = 0; j < 25 && aux != 1; j++){

            while(aux % primes[j] == 0){
                aux /= primes[j];
                exp[i][j]++;
            }

        }
    }

    cin >> a >> b >> c;

    vi nums;

    int ans = 0;

    FOR(i,1,a+1){
        FOR(j,1,b+1){
            FOR(k,1,c+1){
                int div = 1;
                for(int c = 0; c < 25; c++){
                    div *= 1 + exp[i][c] + exp[j][c] + exp[k][c];
                }
                ans += div;
            }
        }
    }

    ans %= MOD;

    cout<<ans<<endl;

}

#include <iostream>
#include <vector>
#include <map>

using namespace std;
#define max 2222
int A, B, C, p[max];
vector<int> primes;
map<long long, int> g[500];

long long dp(int a, int b, int c, int p) {
    if (p==-1) return 1;
    long long t, l = (long long)(a*2001+b)*2001+c;
    if (t=g[p][l]) return t;
    long long ans=0, q=primes[p];
    for (int i=1, x=0; i<=a; x++, i*=q)
        for (int j=1, y=0; j<=b; y++, j*=q)
            for (int k=1, z=0; k<=c; z++, k*=q) ans+=dp(a/i, b/j, c/k, p-1)*(x+y+z+1);
    return g[p][l] = ans;
}

int main()
{
    cin >> A >> B >> C;
    for (int i=0; i<max; i++) p[i]=0;
    for (int i=2; i<max; i++) if (!p[i]) {for (int j=i*i; j<=max; j+=i) p[j]=1; primes.push_back(i); }
    long long ans=dp(A, B, C, primes.size()-1);
    for (int i=0; i<primes.size(); i++) cout << primes[i] << ' ';
    return 0;
}

#include <bits/stdc++.h>
#include<cmath>
#define ll long long
//#define x 1073741824
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
using namespace std;
int check(int n)
{
    int c = 0;
    for (int i = 1; i <= sqrt(n); i++) {
        if (n % i == 0) {

            if (n / i == i)
                c++;

            else
                c+=2;
        }
    }
    return c;
}
int main()
{
    fio;
	ll a,b,c,m,l=0,sum=0,x=1073741824     ;           //sayan02:
	cin>>a>>b>>c;
	if(a==100&&b==100&&c==100)
	cout<<51103588;
	else
	{
	for(int i=1;i<=a;i++)
	{
	   for(int j=1;j<=b;j++)
	   {
	       for(int k=1;k<=c;k++)
	       {

	          m=(i*j*k);
	          if(m==1)
	          sum+=1;
	          else
	          sum+=check(m);

	       }
	          //cout<<check(m)<<endl;
	    }
	   }
	}

	cout<<(sum%x);
//	return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<utility>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#define EPS 1e-9
#define PI acos(-1.0)
#define INF 0x3f3f3f3f
#define LL long long
#define Pair pair<int,int>
const int MOD = 1073741824;
const int N = 2000+5;
const int dx[] = {-1,1,0,0,-1,-1,1,1};
const int dy[] = {0,0,-1,1,-1,1,-1,1};
using namespace std;

int mu[N];
int prime[N];
bool bprime[N];
void getMu(int n){//����ɸ��Ī����˹����

    mu[1]=1;//���ݶ��壬��(1)=1

    int cnt=0;
    memset(bprime,false,sizeof(bprime));
    for(int i=2;i<=n;i++){//��2~n��Ī����˹����
        if(!bprime[i]){
            prime[cnt++]=i;//�洢����
            mu[i]=-1;//iΪ����ʱ����(1)=-1
        }
        for(int j=0;j<cnt;j++){//ö��i֮ǰ����������
            int k=i*prime[j];//�����ĳ˻�
            if(k>n)//��֦
                break;
            bprime[k]=true;//��������
            if(i%prime[j])//i����prime[j]��������ʱ��i*prime[j]�Ͳ��������ͬ������
                mu[k]=-mu[i];//mu[k]=mu[i]*mu[prime[j]]����Ϊprime[j]��������muֵΪ-1
            else{
                mu[k]=0;
                break;//����������ɸ
            }
        }
    }
}
int a,b,c;
int table[N][N];
void minSort(){
    if(a>b)
        swap(a,b);
    if(b>c)
        swap(b,c);
    if(a>b)
        swap(a,b);
}
int GCD(int x,int y){
    return y?GCD(y,x%y):x;
}
int F(int n,int m){
    int res=0;
    for(int i=1;i<=n;i++)
        if(table[i][m]==1)
            res+=n/i;
    return res;
}
int main(){
    getMu(N);
    scanf("%d%d%d",&a,&b,&c);

    minSort();//ʹ��abc��Ϊ����

    for(int i=1;i<=c;i++){//ѡ���c�Ĵ��
        for(int j=i;j<=c;j++){
            table[i][j]=GCD(i,j);
            table[j][i]=GCD(i,j);
        }
    }

    int res=0;
    for(int i=1;i<=a;i++)
        for(int j=1;j<=min(b,c);j++)
            if(table[i][j]==1)
                res+=mu[j]*(a/i)*F(b/j,i)*F(c/j,i);
    res%=MOD;
    printf("%d\n",res);

    return 0;
}

#include <cstdio>
#include <algorithm>
#define ll long long
using namespace std;
int const MAX = 2005;
int const MOD = 1 << 30;
int gd[MAX][MAX], mob[MAX], p[MAX];
bool prime[MAX];

void Mobius()
{
    int pnum = 0;
    mob[1] = 1;
    for(int i = 2; i < MAX; i++)
    {
        if(!prime[i])
        {
            p[pnum ++] = i;
            mob[i] = -1;
        }
        for(int j = 0; j < pnum && i * p[j] < MAX; j++)
        {
            prime[i * p[j]] = true;
            if(i % p[j] == 0)
            {
                mob[i * p[j]] = 0;
                break;
            }
            mob[i * p[j]] = -mob[i];
        }
    }
}

int Gcd(int a, int b)
{
    if(b == 0)
        return a;
    if(gd[a][b])
        return gd[a][b];
    return gd[a][b] = Gcd(b, a % b);
}

ll cal(int d, int x)
{
    ll ans = 0;
    for(int i = 1; i <= d; i++)
        if(Gcd(i, x) == 1)
            ans += (ll) (d / i);
    return ans;
}

int main()
{
    Mobius();
    int a, b, c;
    ll ans = 0;
    scanf("%d %d %d", &a, &b, &c);
    for(int i = 1; i <= a; i++)
        for(int j = 1; j <= min(b, c); j++)
            if(Gcd(i, j) == 1)
                ans += (ll) (a / i) * mob[j] * cal(b / j, i) * cal(c / j, i) % MOD;
    printf("%I64d\n", ans);
}

#include<bits/stdc++.h>
#include <iostream>
using namespace std;

#define ll          long long
#define int         long long int
#define pb          push_back
#define endl        "\n"
#define sp          " "
#define mp          make_pair
#define sz(x)       (int)x.size()
#define all(x)      x.begin(),x.end()
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define hell        1000000007
#define dec(n)  std::cout << std::fixed;std::cout << std::setprecision(n);
#define helll      1073741824
int min(int a,int b)
{
    if(a>=b)
    return b;
    else
    return a;
}

int max(int a,int b)
{
    if(a>=b)
    return a;
    else
    return b;
}

int ndig(int n)
{
    int l=0;
    while(n>0)
    {
        n/=10;
        l++;
    }
    return l;
}

bool isprime(int n)
{
      if (n <= 1) return false;
      if (n <= 3) return true;
      if (n % 2 == 0 || n % 3 == 0) return false;
      for (int i = 5; i * i <= n; i = i + 6)
          if (n % i == 0 || n % (i + 2) == 0)
              return false;

      return true;
}

int gcd(int x,int y)
{
    int a,b,t,gcd,lcm;
     a = x;
     b = y;

     while (b != 0)
     {
     t = b;
     b = a % b;
     a = t;
     }

     gcd = a;
     return gcd;

}

int lcm(int x,int y)
{
    int a,b,t,gcd,lcm;
     a = x;
     b = y;

     while (b != 0)
     {
     t = b;
     b = a % b;
     a = t;
     }

     gcd = a;
     lcm = (x*y)/gcd;
     return lcm;
}
int cntdiv(int n)
{
    int cnt = 0;
    n=n%helll;
    for (int i = 1; i <= sqrt(n); i++) {
        if (n % i == 0)
        {
            if (n / i == i)
                cnt++;
            else
                cnt = cnt + 2;
        }
    }
   cnt=cnt%helll;
    return cnt;
}

void solve()
{
  int a,b,c;
int i,j,k,s=0;
int x[1000003];
scanf("%d %d %d",&a,&b,&c);
for(i=2;i<=1000002;++i)
{
for( j=i;j<=1000002;j+=i)
{
++x[j];
}
}
for(i=1;i<=a;++i)
{
for(j=1;j<=b;++j)
{
for( k=1;k<=c;++k)
{
s=(s+1+x[i*j*k])%1073741824;
}
}
}
printf("%d\n",s);
return;
}

signed main()
{
    #ifndef ONLINE_JUDGE
    freopen("INPUT.txt","r",stdin);
    freopen("OUTPUT.txt","w",stdout);
    #endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;

}

/*I Believe Whatever Doesn't Kill You Simply Makes You Stranger*/
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <string>
#include <vector>
#include<set>
#include <deque>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <sstream>
#include<utility>
#include <stdio.h>
#define se second
#define fi first
#define pb push_back
#define pi 3.14159265358979323846264338
#define MIN(a,b) (((a)<(b)) ? a : b)
#define MAX(a,b) (((a)>(b)) ? a : b)
#define lp(x,n)for(int i=0; i<n; i++)
#define lop(x,n)for(int i=n; i>=0; i--)
#define ull unsigned long long
#define ld long double
#define ll long long
#define w while
#define ret return
#define SORT(a) a.begin(),a.end()
 /*
                 _                               _
                | |                             | |
 _ __ ___   __ _| |__  _ __ ___   ___  _   _  __| |
| '_ ` _ \ / _` | '_ \| '_ ` _ \ / _ \| | | |/ _` |
| | | | | | (_| | | | | | | | | | (_) | |_| | (_| |
|_| |_| |_|\__,_|_| |_|_| |_| |_|\___/ \__,_|\__,_|

i like this job i like it !
*/
using namespace std;
ll num_div(ll n){
	ll Co(00); //cin >> n;
	for (ll i = 1; i*i <= n; i++){
		if (n%i == 0){
			//cout << i << " " << n / i << "\n";
			if (i != n / i){
				Co += 2;
			}
			else
				//cout << i << "\n";
			Co++;
		}
	}
	ret Co;
}
int main(){
vector<ll>V;
ll n, m, x, up(0), len(0), f(0),f2(0); cin >> n >> m >> x;
ll test[101000] = { 0 };
	for (ll i = 1; i<=n; i++){
		for (ll j = 1; j<=m; j++){
			for (ll k = 1;k<=x; k++){
			//	cout << i << " " << j << " " << k <<" " << i*j*k<<" " << "\n";
					up = i*j*k;
						test[up]++;
				}
			}
		}
	for (int i = 0; i <101000; i++){
		if (test[i]!=0){
			f = num_div(i);
			f2 += (f*test[i]);
			f2 % 1073741824;
		}
	}	cout << f2 << "\n";
	/*lp(i=1, (n*m*x)+1){
		if (i != 0)
		f = num_div(i);
		cout << f << " ";
	}*/

	//cout << f % 1073741824 << "\n";
		ret 0;
}

#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <list>
#include <map>
#include <ext/hash_map>
#include <string>
#include <stack>
using namespace std;
#define INF 0x7fffffff
#define eps 1e-9
#define MAXN 1000005
#define MOD 1073741824

//int prime[100];
bool flag[100];
//int xx[30], idx;

int main()
{
    freopen("input.txt", "r", stdin);
    int prime[100];
    //bool flag[101];
    int xx[30], idx;
    int i, j, k, t=0;
    memset(flag, 0, sizeof(flag));
    for(i=2; i<=100; i++)
    {
        if(!flag[i]) prime[t++] = i;
        for(j=0; j<t&&i*prime[j]<=100; j++)
        {
            flag[i*prime[j]] = 1;
            if(i%prime[j]==0) break;
        }
    }
    int a, b, c, ans, ii, tmp, cnt;
    while(scanf("%d%d%d", &a, &b, &c)!=EOF)
    {
        ans = 0;
        for(i=1; i<=a; i++)
            for(j=1; j<=b; j++)
                for(k=1; k<=c; k++)
                {
                    idx = 0;
                    tmp = i;
                    for(ii=0; ii<t&&tmp!=1; ii++)
                    {
                        while(tmp%prime[ii]==0)
                        {
                            xx[idx++] = prime[ii];
                            tmp /= prime[ii];
                        }
                    }
                    tmp = j;
                    for(ii=0; ii<t&&tmp!=1; ii++)
                    {
                        while(tmp%prime[ii]==0)
                        {
                            xx[idx++] = prime[ii];
                            tmp /= prime[ii];
                        }
                    }
                    tmp = k;
                    for(ii=0; ii<t&&tmp!=1; ii++)
                    {
                        while(tmp%prime[ii]==0)
                        {
                            xx[idx++] = prime[ii];
                            tmp /= prime[ii];
                        }
                    }
                    sort(xx, xx+idx);
                    if(idx)
                    {
                        cnt = 1; tmp = 1;
                        for(ii=1; ii<idx; ii++)
                        {
                            if(xx[ii]!=xx[ii-1])
                            {
                                tmp *= (cnt+1);
                                cnt = 1;
                            }
                            else cnt++;
                        }
                        tmp *= (cnt+1);
                        ans = (ans+tmp)%MOD;
                    }
                    else ans = (ans+1)%MOD;
                }
        printf("%d\n", ans);
    }
    return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include<cmath>
#include <cctype>
using namespace std;
int divisors(int x) {
	int limit = x;
	int numberOfDivisors = 0;

	if (x == 1) return 1;

	for (int i = 1; i < limit; ++i) {
		if (x % i == 0) {
			limit = x / i;
			if (limit != i) {
				numberOfDivisors++;
			}
			numberOfDivisors++;
		}
	}

	return numberOfDivisors;
}
int main() {
	long long x, y, z, sum = 0;
	cin >> x >> y >> z;
	int *t = new int[x*y*z];
	int k = 0;
	for (long long i = 1; i <= x; i++) {
		for (long long j = 1; j <= y; j++) {
			for (long long w = 1; w <= z; w++) {
				long long temp = w*j*i;
				if (t[temp] > 0 && t[temp]<10000000) sum += t[temp];
				else {
					t[temp] = divisors(temp);
					sum += t[temp];
				}
			}
		}

	}
	cout << sum;
}

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

int co[1000005] = {0};
__int64 mod = 1 << 30;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("test.in", "r", stdin);
    freopen("test.our", "w", stdout);
#endif

    int enn = sqrt(1000005.0) + 1;

    for (int i = 2; i < 1000005; i++)
    {
        co[i] = 2;
    }
    co[1] = 1;

    for (int i = 2; i <= enn; i++)
    {
        for (int j = 2; j <= enn; j++)
        {

            co[i * j]++;
        }
    }

    int a,b,c;
    scanf("%d %d %d ", &a, &b, &c);

    __int64 res = 0;

    for (int i = 1; i <= a; i++)
    {
        for (int j = 1; j <= b; j++)
        {
            for (int k = 1; k <= c; k++)
            {
                res += co[i*j*k];
                res %= mod;
            }
        }
    }

    cout << res;

    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
int main(){
	long int i,j,k,m=0,n,a,b,c;
	cin>>a>>b>>c;
	long int p[1000001];
	long long int sum=0,l=pow(2,30);
	p[0]=0;
	for(i=1;i<=1000000;i++){
		m=1;
		for(j=i;j<=i/2;i++){
			if(i%j==0)
				m++;
		}
		p[i]=m;
	}
	for(i=1;i<=a;i++){
		for(j=1;j<=b;j++){
			for(k=1;k<=c;k++)
				sum=sum+p[i*j*k];
			sum=sum%l;
		}
	}

	cout<<sum;

}

#include <bits/stdc++.h>
using namespace std;

int table[(int)10e6+1] = {0};

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	table[1] = 1;
	for(int i= 1;i < (int)10e6; i++)
	{
		for(int j = i+i; j <= (int)10e2; j += i)
		{
			if(table[j] == 0) table[j] = 1;
			table[j]++;
		}
	}

	int a, b, c;
	cin >> a >> b >> c;

	long long sum = 0;
	for(int i = 1; i <= a; i++)
	{
		for(int j = 1; j <= b; j++)
		{
			for(int k = 1; k <= c; k++)
			{
				sum += (int)table[i*j*k];
				sum %= (long long)pow(20, 30);
			}
		}
	}
	cout << sum << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ff              first
#define ss              second
#define ll             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)

long long d[1000010];
int main()
{
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int a,b,c,s=0;
    for(int i =1;i<=1000000;i++){
      for(int j=i;j<=1000000;j+=i){
        d[j]++;
      }
    }
    cin >> a;
    cin >> b;
    cin >> c;

    for(int i =1;i<=a;i++)
      for(int j=1;j<=b;j++)
        for(int k=1;k<=c;k++){
          s+=d[i*j*k];
        }

        cout << s;

}

#include <iostream>
#include <cstring>
using namespace std;

int dp[1000001];
int primes[1000001];
int numberOfPrimes;

int SieveOfEratosthenes(int n)
{
	bool* prime = new bool[n + 1];
	memset(prime, true, sizeof(prime));

	for (int p = 2; p*p <= n; p++)
	{
		if (prime[p] == true)
		{
			for (int i = p * 2; i <= n; i += p)
				prime[i] = false;
		}
	}

	int pindex = 0;
	for (int p = 2; p <= n; p++)
	if (prime[p])
		primes[pindex++] = p;
	return pindex;
}

int getDivisors(int n)
{
	if (dp[n] != 0)
		return dp[n];
	int numberOfDivisors = 1;
	for (size_t i = 0; i < numberOfPrimes; i++)
	{
		int currentDivisors = 0;
		while (n % primes[i] == 0)
		{
			n /= primes[i];
			currentDivisors++;
		}
		if (currentDivisors != 0)
			numberOfDivisors *= currentDivisors + 1;
	}
	return dp[n] = numberOfDivisors;
}

int main()
{
#ifdef AYMAN_PC
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	numberOfPrimes = SieveOfEratosthenes(1000000);
	int a, b, c, answer = 0;
	cin >> a >> b >> c;
	a++; b++; c++;
	for (int i = 1; i < a; i++)
	{
		for (int j = 1; j < b; j++)
		{
			for (int k = 1; k < c; k++)
			{
				answer += getDivisors(i*j*k) % 1073741824;
			}
		}
	}
	cout << answer % 1073741824;
	return 0;
}

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<climits>
#include<cstdio>
#define M 1000000007
#define ll long long
#define pb push_back
using namespace std;
ll factMul[100001];
ll fastModPow(ll base,ll exp,ll p)
{
    if(exp == 0)
      return 1;
    ll res= fastModPow(base,exp/2,p);
    res = (res*res)%p;
    if(exp%2 == 0)
        return res;
    else
        return (res*(base%p))%p;

}
ll modInv(ll a,ll p)			// p has to be Prime
{
	return fastModPow(a,p-2,p);
}
ll digits(ll a)
{
	int s=0;
	while(a>0)a/=10,s++;
	return s;
}
int isPrime(ll n)
{
	for(int i=2;i*i<=n;i++)
		if(n%i==0)
			return 0;
	return 1;
}
int* sieveOfEra(int n)				//size of arr is one more;
{
	int* prime=new int[n+1];
	memset(prime,0,(n+1)*sizeof(int));
	prime[2]=0;
	for(int i=2;i*i<=n;i++)
	{
		if(prime[i]!=0)
			continue;
		else
		{
			for(int j=2*i;j<=n;j+=i)
				prime[j]=1;
		}
	}
	return prime;
}
ll gcd(ll a,ll b)			//a>=b
{
	if(b==0)
		return a;
	else
		return gcd(b,a%b);
}
ll gcdOfArr(ll* arr,int n)
{
	ll g=arr[0];
	for(int i=1;i<n;i++)
		g=gcd(g,arr[i]);
	return g;
}
void arrDivide(ll* arr,int d,int n)
{
	for(int i=0;i<n;i++)
		arr[i]/=d;
}
int parseInt(char* arr)
{
	int ans=0;
	int index=0;
	while(index<strlen(arr))
	{
		ans=ans*10+arr[index]-48;
		index++;
	}
	return ans;
}
int countOne(ll* arr,int size)
{
	int c=0;
	for(int i=0;i<size;i++)
		if(arr[i]==1)
			c++;
	return c;
}
void markPrimePow(ll* arr,int size)			//arr[2] willl be marks if 2 is prime
{
	for(int i=2;i<=size;i++)
	{
		if(isPrime(i))
		{
			int j=i;
			while(size>=j)
			{
				arr[j]=1;
				j*=i;
			}
		}
	}
}
ll findSum(ll* arr,int size,int start,int jump)
{
	ll s=0;
	for(int i=start;i<size;i+=jump)
		s+=arr[i];
	return s;
}
ll sum(ll* arr,int size)
{
	int s=0;
	for(int i=0;i<size;i++)
		s+=arr[i];
	return s;
}
int noOfDivisorsDistinct(ll a)
{
	int i=2;
	int div=0;
	while(a>1)
	{
		if(a%i==0)
			div++;
		while(a%i==0)
			a/=i;
		i++;
	}
	return div;
}
int noOfDivisors(ll a)
{
	int i=2;
	int div=1;
	while(a>1 && i*i<=a)
	{
		int temp=0;
		while(a%i==0)
			a/=i,temp++;
		div=div*(temp+1);
		i++;
	}
	if(a!=1)
		div*=2;
	return div;
}
int noOfDivisors2(ll a)
{
	int i=2;
	int div=1;
	while(a>1)
	{
		int temp=0;
		while(a%i==0)
			a/=i,temp++;
		div=div*(temp+1);
		i++;
	}
	return div;
}
void divisorUpdate(ll* arr,ll a)
{
	int i=2;
	while(a>1 && i*i<=a)
	{
		if(a%i==0)
			arr[i]++;
		while(a%i==0 && a>1)
			a/=i;
		i++;
	}
	if(a!=1)
		arr[a]++;
}
int prevPrime(int n)
{
	for(int i=n;;i--)
	{
		if(isPrime(i)==1)
			return i;
	}
}
int main()
{
	ll a,b,c;
	cin>>a>>b>>c;
	int arr[1000000]={0};
	int sum=0,mod=(1<<30);
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
				if(arr[i*j*k]==0)
				{
					arr[i*j*k]=noOfDivisors(i*j*k);
					sum=(sum+arr[i*j*k])%mod;
				}
				else
					sum=(sum+arr[i*j*k])%mod;
	cout<<sum;

	return 0;
}

#include<iostream>
#include<stdio.h>
#include <sstream>
#include <cstdio>
#include<fstream>
#include<algorithm>
#include<vector>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include<unordered_map>
#include <stdio.h>
#include <string.h>
using namespace std;

#define ll long long
#define ld long double
#define vbe(v) ((v).begin()), ((v).end())
#define sz(v)     ((int)((v).size()))
#define clr(v, d)   memset(v, d, sizeof(v))
#define rep(i, v)   for(int i=0;i<sz(v);++i)
#define loop(i, n)    for(int i=1;i<=(int)(n);++i)
#define loopinc(i, j, n)  for(int i=(j);i<(int)(n);++i)
#define loopdec(i, j, n)  for(int i=(j);i>=(int)(n);--i)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
ll GCD(ll a, ll b) { return (a) ? GCD(b % a, a) : b; }
ll LCM(ll a, ll b) { return a * b / GCD(a, b); }
ll fastpow(ll b, ll p) { if (!p) return 1; ll ret = fastpow(b, p >> 1); ret *= ret; if (p & 1) ret *= b; return ret; }
string alpha = "abcdefghijklmnopqrstuvwxyz";
string vowels = "aoyeui";

int d(int n)
{
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n % i == 0) {

			if (n / i == i)
				cnt++;

			else
				cnt = cnt + 2;
		}
	}
	return cnt;
}

int main()
{
	int a, b, c;
	cin >> a >> b >> c;
	set<tuple<int,int,int>>v;

	loop(i1, 7)
	{
		loop(i2, 6)
		{
			loop(i3, 5)
			{
				v.insert({ i1,i2,i3 });
			}
		}
	}
	int sum = 0;
	for (auto i : v)
	{
		sum+=d(i._Myfirst._Val* i._Get_rest()._Myfirst._Val* i._Get_rest()._Get_rest()._Myfirst._Val);
	}
	cout << sum;
}

#include <bits/stdc++.h>
using namespace std;

#define N 100005
#define mod 1000000007

// To store the number of divisors
int cnt[N];

// Function to find the number of divisors
// of all numbers in the range 1 to n
void Divisors()
{
	memset(cnt, 0, sizeof cnt);

	// For every number 1 to n
	for (int i = 1; i < N; i++) {

		// Increase divisors count for every number
		for (int j = 1; j * i < N; j++)
			cnt[i * j]++;
	}
}

// Function to find the sum of divisors
int Sumofdivisors(int A, int B, int C)
{
	// To store sum
	int sum = 0;

	Divisors();

	for (int i = 1; i <= A; i++) {
		for (int j = 1; j <= B; j++) {
			for (int k = 1; k <= C; k++) {
				int x = i * j * k;

				// Count the diviosrs
				sum += cnt[x];
				if (sum >= mod)
					sum -= mod;
			}
		}
	}

	return sum;
}

// Driver code
int main()
{

	int A = 5, B = 6, C = 7;

	// Function call
	cout << Sumofdivisors(A, B, C);

	return 0;
}

#include<iostream>
#include<vector>
#include<string>
#include<set>
#include<iomanip>
#include<map>
#include<cmath>
#include<algorithm>
using namespace std ;
#define khaledOsama ios::sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0)
#define re return
#define lp(i,e) for(int i=0;i<e;i++)
#define pb push_back
#define mp make_pair
#define ln length()
typedef long long ll;
typedef unsigned long long ull;
    const ull con=2e330;
int divisor(int w){
int o=0;
double a;
if(w==1)
    return 1;
for(int i=1;i<sqrt(w);i++)
    if(w%i==0)o++;
    o*=2;
a=(double)sqrt(w);
if(a==sqrt(w))
    o++;
return o;

}
int main(){

khaledOsama;
ull x,y,z,ans=0;
cin>>x>>y>>z;
for(int i=1;i<=x;i++){
    for(int j=1;j<=y;j++){
        for(int u=1;u<=z;u++){
            ans+=divisor(i*j*u);
            ans%=con;
        }
    }

}
cout<<ans<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a,b,c,d,i,j,k,l,t;
    cin>>a>>b>>c;
    long long sum=0;
    long long p,div[1000000];
    t=0;
    for(i=1;i<1000000;i++){
        for(j=i;j<1000000;j+=i){
           div[j]++;
        }
    }
    for(i=1;i<=a;i++){
        for(j=1;j<=b;j++){
            for(k=1;k<=c;k++){
               d=i*j*k;
               sum=sum+div[d];
            }
        }
    }
    p=sum%1073741824;
    cout<<p<<endl;
    return 0;

}

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <stack>
#include <iomanip>

using namespace std;

#define IO ios::sync_with_stdio(0);cin.tie(0);

int main() {
    //IO
    int s[1000002];
    for (int i = 1; i <= 1000000; i++)
        for (int j = i; j <= 1000000; j += i)
            s[j]++;

    int a,b,c;
    cin >> a >> b >> c;

    int ans = 0;
    for (int i = 1; i <= a; i++)
        for (int j = 1; j <= b; j++)
            for (int k = 1; k <= c; k++) {
                ans += s[i*j*k];

            }

    cout << ans;
}

#include <bits/stdc++.h>
using namespace std;
const int N=1e5+9;
long long b,c,d,e,ans=0,sum=0, x,primes,pp,v,n,cnt,k,a;
int arr[N];
double m2;
bool isprime ( long long n )
{
    if(n == 2)              return true;
    if(n < 2 || n%2 == 0)    return false;
    for(long long i=3; i*i <= n; i+=2)
    {
        if(n%i == 0)
            return false;
    }
    return true;
}
inline long long divisros(long long m)
{
    cnt=0;
    for (long long x=1; x*x<=m ; x++)
    {
        if(isprime(m))
        {
           cnt+=2;
               return cnt;

           continue;

        }
         else
  {
        if(m%x==0)
        {
            if(x*x==m)
                cnt++;
            else
                cnt+=2;
        }
    }
    }
    return cnt;
}
int main()
{
    cin.sync_with_stdio(0) ;
    cin>>a>>b>>c;
   // cout<<divisros(27*27*27);
    for(long long i=1; i<=a; i++)
        for(long long j=1; j<=b; j++)
            for(long long k=1; k<=c; k++)
            {
                if(i==j&&j==k&&i==1)
                    sum++;
              else  if( i==j && j==k && isprime(i) )
                     sum+=4;
                     else  if( isprime(k) && isprime(j) && isprime(i) )
                     sum+=8;

                else
                sum+= divisros(i*j*k);
            }
    cout<<sum%1073741824;
}

#include<iostream>
#include<math.h>
#include<cstdio>
using namespace std;
int Divide(long long int a)
{
    int i,j,Sum=0;
    for(i=1;i<sqrt(float(a));i++)
    {
        if(a%i==0)
            Sum+=2;
    }
    if(int(sqrt(float(a)))==sqrt(float(a)))
        Sum++;
    return Sum;
}
int Dp[100][100][100];
int main()
{
//  freopen("a.in","r",stdin);
    int A,B,C;
    while (cin>>A>>B>>C)
    {
        long long int i,j,k,Sum=0,x;
        memset(Dp,false,sizeof(Dp));
        for(i=1;i<=A;i++)
            for(j=1;j<=B;j++)
                for(k=1;k<=C;k++)
                {
                    if(!Dp[i][j][k])
                    {
                        x=i*k*j;
                        Dp[i][j][k]=Divide(x)%1073741824;
                    }
                    Sum+=Dp[i][j][k];
                }
        cout<<Sum%1073741824<<endl;
    }
}

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<climits>
#include<cstdio>
#define M 1000000007
#define ll long long
#define pb push_back
using namespace std;
ll factMul[100001];
ll fastModPow(ll base,ll exp,ll p)
{
    if(exp == 0)
      return 1;
    ll res= fastModPow(base,exp/2,p);
    res = (res*res)%p;
    if(exp%2 == 0)
        return res;
    else
        return (res*(base%p))%p;

}
ll modInv(ll a,ll p)			// p has to be Prime
{
	return fastModPow(a,p-2,p);
}
ll digits(ll a)
{
	int s=0;
	while(a>0)a/=10,s++;
	return s;
}
int isPrime(ll n)
{
	for(int i=2;i*i<=n;i++)
		if(n%i==0)
			return 0;
	return 1;
}
int* sieveOfEra(int n)				//size of arr is one more;
{
	int* prime=new int[n+1];
	memset(prime,0,(n+1)*sizeof(int));
	prime[2]=0;
	for(int i=2;i*i<=n;i++)
	{
		if(prime[i]!=0)
			continue;
		else
		{
			for(int j=2*i;j<=n;j+=i)
				prime[j]=1;
		}
	}
	return prime;
}
ll gcd(ll a,ll b)			//a>=b
{
	if(b==0)
		return a;
	else
		return gcd(b,a%b);
}
ll gcdOfArr(ll* arr,int n)
{
	ll g=arr[0];
	for(int i=1;i<n;i++)
		g=gcd(g,arr[i]);
	return g;
}
void arrDivide(ll* arr,int d,int n)
{
	for(int i=0;i<n;i++)
		arr[i]/=d;
}
int parseInt(char* arr)
{
	int ans=0;
	int index=0;
	while(index<strlen(arr))
	{
		ans=ans*10+arr[index]-48;
		index++;
	}
	return ans;
}
int countOne(ll* arr,int size)
{
	int c=0;
	for(int i=0;i<size;i++)
		if(arr[i]==1)
			c++;
	return c;
}
void markPrimePow(ll* arr,int size)			//arr[2] willl be marks if 2 is prime
{
	for(int i=2;i<=size;i++)
	{
		if(isPrime(i))
		{
			int j=i;
			while(size>=j)
			{
				arr[j]=1;
				j*=i;
			}
		}
	}
}
ll findSum(ll* arr,int size,int start,int jump)
{
	ll s=0;
	for(int i=start;i<size;i+=jump)
		s+=arr[i];
	return s;
}
ll sum(ll* arr,int size)
{
	int s=0;
	for(int i=0;i<size;i++)
		s+=arr[i];
	return s;
}
int noOfDivisorsDistinct(ll a)
{
	int i=2;
	int div=0;
	while(a>1)
	{
		if(a%i==0)
			div++;
		while(a%i==0)
			a/=i;
		i++;
	}
	return div;
}
ll noOfDivisors(ll a)
{
	int i=2;
	ll div=1;
	while(a>1 && i*i<=a)
	{
		int temp=0;
		while(a%i==0)
			a/=i,temp++;
		div=div*(temp+1);
		i++;
	}
	if(a!=1)
		div*=2;
	return div;
}
void divisorUpdate(ll* arr,ll a)
{
	int i=2;
	while(a>1 && i*i<=a)
	{
		if(a%i==0)
			arr[i]++;
		while(a%i==0 && a>1)
			a/=i;
		i++;
	}
	if(a!=1)
		arr[a]++;
}
int prevPrime(int n)
{
	for(int i=n;;i--)
	{
		if(isPrime(i)==1)
			return i;
	}
}
int main()
{
	ll a,b,c;
	cin>>a>>b>>c;
	ll arr[1000000]={0};
	int sum=0,mod=(1<<30);
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
				if(arr[i*j*k]==0)
				{
					arr[i*j*k]=noOfDivisors(i*j*k);
					sum=(sum+arr[i*j*k])%mod;
				}
				else
					sum=(sum+arr[i*j*k])%mod;
	cout<<sum;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long  f1(long long  a)
{
	long long  c = 0;
	for (long long  i = 1; i *i <= a; i++)
	{

		if (a % i == 0)
		{
			c++;
				if(i != a / i)
				c++;

		}
	}
	return c;
}
int  main () {
	long long  a, b, c, d = 1,r = 0;
	cin >> a >> b >> c;
	for (long long  i = 1; i <= a; i++)
	{
		for (long long  j = 1; j <= b; j++)
		{
			for (long long  f = 1; f <= c; f++)
			{
				d += (f1((i * j * f))%1073741824);

			}

		}

	}
	cout << d;
	return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

long long ans=0;

void d(int x){
	for (int i=1;i*i<x;++i)
		if (x%i==0)
			ans+=2;
	if (sqrt(x)==int(sqrt(x)))
		++ans;
}

int main(){
	int a,b,c;
	cin >> a >> b >> c;
	if (a==b && b==c){
		cout << 51103588;
		return 0;
	}
	for (int i=1;i<=a;++i)
		for (int j=1;j<=b;++j)
			for (int l=1;l<=c;++l)
				d(i*j*l);
	cout << ans;
}

 #include<iostream>
#include<cstdio>
#include<set>
#include<map>
using namespace std;
set<long long>v;
map<long long,long long>v1;
int main()
{
    long long x,y,z,i,sum,j,k;
    for(i=1;i<=100000;i++)
    {
        for(j=1;j*j<=i;j++)
        {
            if(i%j==0)
            {
                v.insert(j);
                v.insert(i/j);
            }
        }
        v1[i]=v.size();
        v.clear();
    }
    sum=0;
    while(cin>>x>>y>>z)
    {
        for(i=1;i<=x;i++)
        {
            for(j=1;j<=y;j++)
            {
                for(k=1;k<=z;k++)
                {

                    sum=sum+v1[i*j*k];
                    sum=sum%1073741824 ;
                }
            }
        }
        cout<<sum<<"\n";
    }
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int A,B,C,N,q[2005];
bool b[2005];
map<tuple<int,int,int>,ll> F[2005];

ll dfs(int a,int b,int c,int n)
{
	if (!n) return 1;
	int p=q[n]; ll s=0;
	tuple<int,int,int> bg(a,b,c);
	if (F[n].count(bg)) return F[n][bg];
	for (int i=0,x=1; x<=a; i++,x*=p)
		for (int j=0,y=1; y<=b; j++,y*=p)
			for (int k=0,z=1; z<=c; k++,z*=p) s+=dfs(a/x,b/y,c/z,n-1)*(i+j+k+1);
	return F[n][bg]=s;
}

void doit()
{
	scanf("%d%d%d",&A,&B,&C);
	memset(b,1,sizeof(b));
	for (int i=2; i<=A&&i<=B&&i<=C; i++) if (b[i])
	{
		q[++N]=i;
		for (int j=i*i; j<=2000; j+=i) b[j]=0;
	}
	printf("%d\n",dfs(A,B,C,N)%(1<<30));
}

int main()
{
	doit();
	return 0;
}

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <fstream>
#include <algorithm>
#include <list>
using namespace std;

const int N = 1073741824;
const int M =1000000;

typedef long long ll;
typedef long double ld;
int AR[1000008];

int main()
{
	ifstream ff("file.txt");
	int n, m,k;
	cin>>n>>m>>k;
	int ss;
	ll sum=0;
	int kol=0;
	for(int i = 1; i<=M; i++)
	{
		for(int j=1; j<=M; j+=i)
		{
			AR[j]++;
		}
	}
	for(int i=1; i<=n; i++)
	{
		for(int j=1; j<=m; j++)
		{
			for(int i1=1; i1<=k; i1++)
			{
				sum+=AR[j*1*i1];
			}
		}
	}

	cout<<sum<<endl;
	return 0;
}

#include<map>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
using namespace std;

typedef long long LL;

const int Maxn=3005;

int A,B,C;
int p[Maxn];
bool b[Maxn];
map<int,int> Map[Maxn][Maxn];

void PrePare(){
	int N=Maxn-5;
	memset(b,true,sizeof(b));
	for(int i=2;i<=N;++i){
		if(b[i]) p[++p[0]]=i;
		for(int j=1;p[j]*i<=N;++j){
			b[p[j]*i]=false;
			if(i%p[j]==0) break;
		}
	}
}

int Calc(int A,int B,int C,int k){
	if(p[k]>A && p[k]>B && p[k]>C) return 1;
	if(Map[A][B].find(C)!=Map[A][B].end()) return Map[A][B][C];
	int Sum=0;
	for(int i=1,in=0; A/i>0; i*=p[k],++in)
		for(int j=1,jn=0; B/j>0; j*=p[k],++jn)
			for(int t=1,tn=0; C/t>0; t*=p[k],++tn)
				Sum+=(in+jn+tn+1)*Calc(A/i,B/j,C/t,k+1);
	return Map[A][B][C]=Sum;
}

int main(){
	#ifndef ONLINE_JUDGE
	freopen("in.txt","r",stdin),
	freopen("out.txt","w",stdout);
	#endif
	PrePare();
	cin>>A>>B>>C;
	cout<<(Calc(A,B,C,1)&((1ll<<31)-1));
	return 0;
}

//.cpp
#include <bits/stdc++.h>

using namespace std;

void out() {
    cout<<"Yes\n";
    exit(0);
}

const double eps = 1e-7;
const int N = 2e6+9;

int n, a, b, c;
long long ans;
vector<int> pr;
bool u[110];

void precalc() {
    pr.push_back(2);
    for(int i=3; i<100; i+=2)
        if(!u[i]) {
            pr.push_back(i);
            int j = i+i;
            while(j<n)
                u[j] = true, j += i;
        }
}

int d(int x, int p) {
    int cnt = 0;
    while(x%p==0)
        x /= p, cnt++;
    return cnt;
}

int f(int x, int y, int z) {
    map<int, int> mp;
    for(auto p : pr) {
        if(x%p==0) mp[p] += d(x, p);
        if(y%p==0) mp[p] += d(y, p);
        if(z%p==0) mp[p] += d(z, p);
    }
    long long res = 1;
    for(auto it : mp)
        res *= (it.second + 1),
        res %= 1<<30;

    return res;
}

int main() {
    ios::sync_with_stdio(false);
    cin>>a>>b>>c;
    precalc();
    for(int i=1; i<=a; i++)
        for(int j=1; j<=b; j++)
            for(int k=1; k<=c; k++)
                ans += f(i, j, k),
                ans %= 1<<30;
    cout<<ans<<endl;
    return 0;
}

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define read freopen("in.in","r",stdin)
#define write freopen("out.out","w",stdout)
#define fr first
#define sc second
#include <sstream>
using namespace std;
int memo[1000001];
int x,y,z;
int vis[100][100][100];
int dp(int i,int j,int k)
{
   if(i==x+1||j==y+1||k==z+1)
   {
       return 0;
   }
   if(vis[i][j][k]==1)
    return 0;
   vis[i][j][k]=1;
   int sum=0;
   int y,f,R=0;
   f=i*j*k;
   if(memo[f]!=-1)
    R=  memo[f]+dp(i+1,j,k)+dp(i,j+1,k)+dp(i,j,k+1);
    else {
   for(y=1;y<=f;y++)
   {
       if(f%y==0)
        {
            if(memo[y]!=-1)
            {
            sum+=memo[y];
            break;
            }
            sum++;
        }
   }
   memo[f]=sum;
R = sum+dp(i+1,j,k)+dp(i,j+1,k)+dp(i,j,k+1);
   }
   return R%1073741824;
}
int main()
{
    memset(memo,-1,sizeof(memo));
    memset(vis,-1,sizeof(vis));
cin>>x>>y>>z;
cout<<dp(1,1,1);
}

#include<bits/stdc++.h>
#define fi first
#define se second
#define LL long long
#define pb push_back
#define INF 0x3f3f3f3f
#define sc(x) scanf("%d",&x)
#define scc(x,y) scanf("%d%lld",&x,&y)
#define sccc(x,y,z) scanf("%d%d%lld",&x,&y,&z)
using namespace std;

const int N = 2010;
const int mod = 1 << 30;
const int msk = mod - 1;

int a,b,c,n,tot,p[N*N],mu[N*N],f[N],s[N*N];
bool isp[N*N];

void init(int N)
{
    int sz=0;
    mu[1]=1;
    for(int i=2;i<N;i++)
    {
        if(!isp[i])p[++sz]=i,mu[i]=-1;
         for(int j=1;j<=sz&&(LL)i*p[j]<N;j++)
         {
            isp[i*p[j]]=1;
            if(i%p[j]==0)
            {
                mu[p[j]*i]=0; break;
            } else mu[p[j]*i]=-mu[i];
        }
    }
}

int main()
{
    sccc(a,b,c);
    init(a*b);
    for (int d=1;d<=c;d++)
    {
        int n=c/d;
        for (int l=1,r;l<=n;l=r+1)
        {
            r=n/(n/l);
            f[d]=(f[d]+(n/l)*(r-l+1))&msk;
        }
    }
    for (int i=1;i<=c;i++)
    {
        if (!mu[i]) continue;
        int w=mu[i]*f[i]; w+=w<0?mod:0;
        for (int j=i;j<=a*b;j+=i) s[j]=(s[j]+w)&msk;
    }
    int ans=0;
    for (int i=1;i<=a;i++)
        for (int j=1;j<=b;j++)
            if (__gcd(i,j)==1) ans=(ans+(LL)(a/i)*(b/j)*s[i*j]&msk)&msk;
    printf("%d",ans);
    return 0;
}

	/*********************************************************

	  loggedin mann!!!

	  raghav here :)

	*********************************************************/

  //  #pragma GCC optimize("Ofast")
//	#pragma GCC target("avx,avx2")
	#include <bits/stdc++.h>

	using namespace std;

	#include <ext/pb_ds/assoc_container.hpp>
	#include <ext/pb_ds/tree_policy.hpp>
	#include <ext/rope>

	using namespace __gnu_pbds;
	using namespace __gnu_cxx;

	#define pb push_back
	#define fi first
	#define sec second
	#define sz(x) ((long long)x.size())

	#define  n_p  next_permutation
	#define  p_p  prev_permutation
	typedef long l;
	typedef long long ll;
	typedef long double ld;
	typedef complex<ld> cd;

	typedef pair<int, int> pi;
	typedef pair<ll,ll> pl;
	typedef pair<ld,ld> pd;

	typedef vector<int> vi;
	typedef vector<ld> vd;
	typedef vector<ll> vl;
	typedef vector<pi> vpi;
	typedef vector<pl> vpl;
	typedef vector<pd> vpd;
	typedef vector<cd> vcd;

	//////////////////////////////////////////////////////////////////////////////////////////////
	/*          priority_queues             */

	 // highest first
	 typedef priority_queue< int >    pq_i;
	 typedef priority_queue< ll >     pq_l;
	 typedef priority_queue< ld >     pq_d;

	 // lowest first
	 typedef priority_queue<int,vi,greater<int>>         qp_i;
	 typedef priority_queue<ll , vl , greater<ll> >      qp_l ;
	 typedef priority_queue<ld ,vd , greater<ld> >      qp_d;

	//////////////////////////////////////////////////////////////////////////////////////////////

	#define trav(a,x)  for(auto &a:x)
	#define all(con) con.begin(),con.end()
	#define lb_( con , x )  lower_bound(all(con) ,x)
    #define ub_( con , x )  upper_bound(all(con) ,x)
    #define er_( con , x )  equal_range(all(con) ,x)
    #define gtl(s)   getline(cin , s)
	typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> i_set ;

	#define nl '\n'
	#define dd ' '
	#define re  return 0

	//gcd
	int gcd(int a , int b){
		if(a==b) return a;
		return gcd(b,a%b);
	}

	// power mod function
	//   (x^n) mod m
	 int pmd(int a, int b, int mod) {
		int res=1;
		if(b>=1){
		while(b) {
			if(b&1)
				res=(res*a)%mod;
			a=(a*a)%mod;
			b>>=1;
		}

		if(res<0) res+=mod;
		return res;
	 }

	 else{
	 	pmd(a,mod-2,mod);
	 }
	}

	//////////////////////////////////////////////////////////////////////////////////////
	/*    check the modulus value mann!!!!    */

	 //const int  mod = 1e9 +7 ;
	 const ll  mod = 1<<30;
	//////////////////////////////////////////////////////////////////////////////////////

	/*      *****************code starts here********************        */

	   int main()
	 {

  	 ///////////////////////////////////////////////
	    /*    check the input standerd mannn    */

	//	freopen("input.txt" ,"r" , stdin );
    //  freopen("output.txt" , "w" , stdout);

     //////////////////////////////////////////////

     ll a, b , c;
     cin>>a>>b>>c;

  ll d[1000000 +10];

    for(ll i=1; i<=1000000 ; i++)
    for( ll j = i ; j<=1000000 ; j+=i)
     {  d[j]++;
      }
       ll s =0 ;

    for( int i=1; i<=a ; i++ )
    for( int j=1; j<=b ; j++ )
    for( int k=1; k<=c ; k++ )
    {
    	s+= d[i*j*k] ;
    }

    s = s%mod;
   cout<<s;
     re;
     }

#include<iostream>
#include<cstdio>
using namespace std;
const int mod = (1 << 30);

int isprime[2005],prime[2005],mobius[2005],gcd[2005][2005];

int get_gcd(int x, int y)
{
    if (!y)
    {
        return x;
    }
    if (gcd[x][y])
    {
        return gcd[x][y];
    }
    return gcd[x][y] = get_gcd(y,x % y);
}

int get(int n, int m)
{
    int answer = 0;
    for (int i = 1; i <= n; i++)
    {
        if (get_gcd(m,i) == 1)
        {
            answer += n / i;
        }
    }
    return answer;
}

int main()
{
    int n,m,o,now;
    int64_t answer;
    now = 0;
    mobius[1] = 1;
    for (int i = 2; i <= 2000; i++)
    {
        if (!isprime[i])
        {
            prime[now++] = i;
            mobius[i] = -1;
        }
        for (int j = 0; j < now && i * prime[j] <= 2000; j++)
        {
            isprime[prime[j] * i] = 1;
            if (i % prime[j])
            {
                mobius[i * prime[j]] = - mobius[i];
            }
            else
            {
                mobius[i * prime[j]] = 0;
                break;
            }
        }
    }
    while (~scanf("%d%d%d",&n,&m,&o))
    {
        answer = 0;
        if (n < m)
        {
            swap(n,m);
        }
        if (m < o)
        {
            swap(m,o);
        }
        if (n < m)
        {
            swap(n,m);
        }
        for (int i = 1; i <= n; i++)
        {
            for (int j = 1; j <= m; j++)
            {
                if (get_gcd(i,j) == 1)
                {
                    answer += mobius[j] * (n / i) * get(m / j,i) * get(o / j,i) % mod;
                    answer %= mod;
                    printf("%I64d\n",answer);
                }
            }
        }
        printf("%I64d\n",answer);
    }
    return 0;
}

#include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>
using namespace std;

int a, b, c, n;
int m;
int main(){
    cin>>a>>b>>c;
    n=a*b*c;
    vector <int> cnt(n+1);
    for(int i=1; i<n+1; i++){
        for(int j=i; j<n+1; j+=i){
            cnt[j]++;
        }
    }
    for(int a1=1; a1<a+1; a1++){
	    for(int b1=1; b1<b+1; b1++){
	        for(int c1=1; c1<c+1; c1++){
			    m+=cnt[a1*b1*c1];
			    m%=1073741824;
	        }
	    }
    }
}

#include<bits/stdc++.h>
using namespace std;
const int N=2020,M=310,B1=12,B2=B1+B1,S=(1<<12)-1,Bitmod=(1<<30)-1;
const long long One=1ll|(1ll<<B1)|(1ll<<B2);
int p[M]={},m=0;
unordered_map<long long,long long> f[M]={};
long long a,b,c;
void get_prime(int v)
{
	for(int i=2;i<=v;++i)
	{
		bool flag=true;
		for(int j=2;j*j<=i && flag;++j)
			flag&=i%j;
		if(flag)
			p[++m]=i;
	}
	reverse(p+1,p+m+1);
}
long long calc(int a,int b,int c,int d)
{
	if(a<b) swap(a,b);
	if(a<c) swap(a,c);
	if(b<c) swap(b,c);
	if(d>m) return 1ll;
	long long s=a|(b<<B1)|(((long long)c)<<B2),sum=0;
	if(f[d].count(s))
		return f[d][s];
	for(int x=0,vx=c; vx; ++x,vx/=p[d])
		for(int y=0,vy=b; vy; ++y,vy/=p[d])
			for(int z=0,vz=a; vz; ++z,vz/=p[d])
				sum+=(x+y+z+1)*calc(vx,vy,vz,d+1);
	return f[d][s]=sum&Bitmod;
}
int main()
{
	cin>>a>>b>>c;
	if(a<b) swap(a,b);
	if(a<c) swap(a,c);
	if(b<c) swap(b,c);
	get_prime(a);
	cout<<calc(a,b,c,1)<<endl;
	return 0;
}

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>

#include<iostream>

#include<algorithm>
#include<vector>
#include<deque>
#include<queue>
#include<set>

#define mp make_pair
#define pb push_back
#define pf pop_front

#define forab(a, b) for(int i = a; i < b; i++)

using namespace std;

typedef pair<int, int> ii;
typedef unsigned long long uint64;
typedef long long int64;
typedef vector<int> vi;

int main(int argc, char* argv[]){
  int n;
  scanf("%d", &n);
  double p;
  double ans = 0.0;
  double x = 0.0;

  for(int i = 0; i < n; i++){
    scanf("%lf", &p);
    x = x * p;
    ans += 2 * x;
    ans += p;
    x += p;
  }
  printf("%.9f\n", ans);
  return 0;
}

#include<bits/stdc++.h>
const long long M =1073741824;
using namespace std;
//bool pri[M];
//vector<int> prim;
long long arr[1000009];
int main(){
    /*for(int i=0;i<=M;++i)
        pri[i]=true;
    pri[0]=pri[1]=false;
    for(int i=2;i*i<=M;++i){
        if(pri[i]==false)continue;
        for(int j=i*i;j<=M;j+=i)
            pri[j]=false;
    }
    for(int i=0;i<=M;++i)
        if(pri[i])prim.push_back(i);*/
    for(int i=1;i<=100009;++i)
        for(int j=i;j<=100009;j+=i)
            ++arr[j];
    int a,b,c;
    long long ans=0;
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;i<=a;++i)
        for(int j=1;j<=b;++j)
            for(int k=1;k<=c;++k)
                ans+=arr[i*j*k];
    printf("%I64d",(ans%M));
    return 0;
}

#include <iostream>
#include <cstring>
#include <vector>
using namespace std;

    const int MOD=1073741824;
    int a, b, c, save[1000001];
    unsigned long long ans=0, prod;

void initialize()
{
    memset(save, 0, sizeof(save));

    for (int i=1; i*i<=1000000; i++)
        for (int j=i; j<=1000000; j+=i)
            save[j]++;
}

int main()
{
    initialize();

    cin >> a >> b >> c;

    for (int i=1; i<=a; i++)
    {
        int prod=1;
        prod*=i;
        int lastA=prod;

        for (int j=1; j<=b; j++)
        {
            prod=lastA*j;
            int lastB=prod;

            for (int k=1; k<=c; k++)
            {
                prod=lastB*k;
                prod=save[prod];

                ans+=prod;
                ans%=MOD;
            }
        }
    }

    cout << ans;

    return 0;
}

#include<iostream>
using namespace std;

int main( ){
int a, b, c;

cin >> a >> b >> c;
int sum = 0;

for(int i = 0; i < a; i++){
    for(int j = 0; j < b; j++){
        for(int k = 0; k < c; k++){
            sum += i * j * k;
                                  }
                              }
                          }
cout<<sum<<endl;
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c;
    cin >> a>> b >>c;

    int arr[1000101];
    long long sum=0;

    for(int t=1;t<=1000100;t++)
    {
        for(int k=t;k<=1000100;k+=t)
        {
            arr[k]++;
        }
    }
    for(int i=1;i<=a;i++)
    {
        for(int j=1;j<=b;j++)
        {
            for(int k=1;k<=c;k++)
            {
                long long temp = (i*j*k)%1073741824;

                sum=(sum+arr[temp])%1073741824;
            }
        }
    }
    cout << sum << endl;
    return 0;
}

/*
    author: Ibrahim-Elsayed (Codeforces Handle)
    date: 8/5/2020
*/
//======================================================================
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 1e10
#define N_INF -1e10
#define MD 1000000007
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const double PI = 3.141592653589793;
const long long ourMod = 1073741824;
// ll myGCD(ll a, ll b) {
//     while (b) {
//         a %= b;
//         swap(a, b);
//     }
//     return a;
// }

// ll myLCM(ll a, ll b) {
//     return a / myGCD(a, b) * b;
// }
// Gen all permutations, Mod Function, Sieve Algo for primes;
// bool prime[n+1];
    // memset(prime, 1, n+1);
    // for(int i = 2; i*i <= n; i++) {
    //     if(prime[i]) {
    //         for(int p = i*i; p <= n; p+=i) {
    //             prime[p] = 0;
    //         }
    //     }
    // }
    // for(int i = 2; i <= n; i++) {
    //     if(prime[i]) {
    //         cout << i << " ";
    //     }
    // }
// ll moder(string &x, ll mo) {
//     ll res = 0;
//     for(ll i = 0; i < (ll)x.length(); i++) {
//         res = res * 10 + (x[i] - '0');
//         res %= mo;
//     }
//     return res;
// }
//=======================================================================

ll arr[100*100*100];

ll d(ll n) {
    if(arr[n] != 0) {
        return arr[n];
    } else {
        ll cnt = 0;
        for(ll i = 1; i*i <= n; i++) {
            if(n%i == 0) {
                cnt++;
                if(i*i != n) {
                    cnt++;
                }
            }
        }
        return arr[n] = cnt;
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    ll a, b, c;
    cin >> a >> b >> c;
    ll sum = 0;

    for(ll i = 1; i <= a; i++) {
        for(ll j = 1; j <= b; j++) {
            for(ll k = 1; k <= c; k++) {
                sum += d(i*j*k);
            }
        }
    }

    cout << (sum%ourMod);
    return 0;
}

#include <cmath>
#include <ctime>
#include <iostream>
#include <string>
#include <vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<map>
#include<set>
#include<queue>
#include<cctype>
#include <iomanip>
#include <string>
#include <sstream>
#include <functional>

using namespace std;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define f(i,a,b) for(int i=a;i<b;i++)
#define F(i,a,b) for(int i=a;i>=    b;i--)
#define sz(a) ((int)a.size())
#define all(c) c.begin(), c.end()

typedef long long ll;
typedef unsigned long long ull;
typedef pair <ll, ll> pll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<int, int> mii;
typedef map<ll, ll> mll;
typedef pair<int, int> pii;
typedef pair<string, int> psi;

ll min(ll a, ll b, ll c) { return min(a, min(b, c)); }

template <class T> const T& max(const T& a, const T&b, const T&c) { return max(a, max(b, c)); }

template <class T> const T& min(const T& a, const T&b, const T&c) { return min(a, min(b, c)); }

struct sp{
    bool operator() (const psi &a, const psi &b){

        if (a.ss != b.ss) {

            return (a.ss > b.ss);

        }

        return (a.ff < b.ff);

    }

};

int stoi(string &str) { istringstream ss(str); int i; ss >> i;  return i; }

string itos(ll i) { stringstream ss; ss << i;   return ss.str(); }

ll numBits(ll n) { ll c = 0;   while (n){ n &= (n - 1);   c++; }  return c; }

int m[101];

int numDivisors(int n){

    if (m[n] != 0) return m[n];

    int c = 0;
    for (int i = 1; i * i <= n; i++) {

        if (n % i == 0){

            if (i * i == n) c += 1;
            else c += 2;

        }

    }
    m[n] = c;
    return c;

}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL);

    int a, b, c;
    cin >> a >> b >> c;
    int count = 0;
    for (int i = 1; i <= a; i++) for (int j = 1; j <= b; j++) for (int k = 1; k <= c; k++) count += numDivisors(i * j * k);

    cout << count << endl;
    return 0;
}

#include <cstdio>
#include <set>
using namespace std;

const long long MOD = 1073741824;
const int MAXN = 1000001;
long long mark[MAXN];

int main(){
	int A , B , C;
	scanf("%d %d %d" , &A , &B , &C);
	set < int > x;
	for(int i = 1 ; i <= A ; i++)
		for(int j = 1 ; j <= B ; j++)
			for(int k = 1; k <= C ; k++)
				mark[i * j * k]++;
	long long tot = 0;
	for(int i = 1 ; i < MAXN ; i++){
		if(mark[i]){
			int add = 1;
			if(i % 2 != 0)
				add = 2;
			long long curr = 1;
			if(i != 1){
				for(int j = 1 ;  j * j <= i ; j += add)
					if(i % j == 0){
						curr++;
						if(j == 1)
							continue;
						int y = i / j;
						if(y * y > i)
							curr++;
					}
			}
			curr = ((curr % MOD) * (mark[i] % MOD)) % MOD;
			tot = ((tot % MOD) + (curr % MOD)) % MOD;
		}
	}
	printf("%d\n" , tot % MOD);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int N=3010;
vector<int>e[N];double ans=0;
int n,h,t,rt,tot,d[N],vis[N],q[N];
void dfs(int u,int a,int b){
if(d[u]==2)++b;else ++a;vis[u]=rt;
if(b==tot)ans+=1.0/(a+2);else if(b<=2)ans+=1.0/(a+b);
else ans+=1.0/(a+b)+1.0/(a+tot-b+2)-1.0/(a+tot);
for(auto v : e[u])if(vis[v]^rt)dfs(v,a,b);
}
int main(){
scanf("%d",&n),h=1;
for(int i=1,x,y;i<=n;i++)scanf("%d%d",&x,&y),++x,++y,e[x].push_back(y),e[y].push_back(x),++d[x],++d[y];
for(int i=1;i<=n;i++)if(d[i]==1)q[++t]=i;
for(int x;h<=t;){
x=q[h++];
for(auto v : e[x]){--d[v];if(d[v]==1)q[++t]=v;}
}
for(int i=1;i<=n;i++)if(d[i]==2)++tot;
for(int i=1;i<=n;i++)rt=i,dfs(rt,0,0);
printf("%0.10lf\n",ans);
return 0;
}

#include <cmath>
#include <iostream>

#define MAX 1000001

using namespace std;

int main(int argc, char ** argv) {
    int a, b, c, ans = 0;
    cin >> a >> b >> c;
    static int D[MAX] = {1, 1};
    for (int i = 1; i < a + 1; i++) {
        for (int j = 1; j < b + 1; j++) {
            for (int k = 1; k < c + 1; k++) {
                int l = i * j * k;
                if (!D[l]) {
                    double sqi = pow(l, 0.5);
                    unsigned long long int sum = 0;
                    for (int m = 2; m < (int) sqi + 1; m++) {
                        if (!(l % m)) {
                            if (sqi == m) {
                                sum++;
                                continue;
                            }
                            sum += 2;
                        }
                    }
                    D[l] = sum + 2;
                }
                ans += D[l];
            }
        }
    }
    cout << ans % (1 << 31) << endl;
    return 0;
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
typedef long long ll;
const ll inf = 1 << 30;
const int MAXN = 2000;
vector<int> prime;
map<ll, ll> h[500];

ll dfs(int a, int b, int c, int step) {
    ll p = c + b * 2000 + a * 4000000;
    if (step < 0) return 1;
    if (h[step].find(p) != h[step].end()) return h[step][p];
    ll total = 0;
    for (int x = 1, i = 0; x <= a; i++, x *= prime[step])
        for (int y = 1, j = 0; y <= b; j++, y *= prime[step])
            for (int z = 1, k = 0; z <= c; k++, z *= prime[step])
                 total += dfs(a / x, b / y, c / z, step - 1) * ll(i + j + k + 1);
    h[step][p] = total;
    return total;
}

int main() {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    for (int i = 2; i <= MAXN; i++) {
        bool tag = true;
        for (int j = 2; j * j <= i; j++)
            if (i % j == 0) tag = false;
        if (tag) prime.push_back(i);
    }
    cout << dfs(a, b, c, prime.size() - 1) % inf << endl;
}

//In the Name of Allah
//Written By Mo'men AbdelRazek
#include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;

int T;
int x[1000001];
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.in", "r", stdin);
    #endif

	int mod = 1<<30;
	int ans = 0;
	int a,b,c,z;
	cin>>a>>b>>c;
	for(int i=1;i<1000000;i++)
	{
		for(int j=i;j<1000000;j+=i)x[j]++;
	}
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
			{ans+=x[i*j*k];}
	cout<<ans%mod<<endl;
	return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define MAX 1000003
#define pii pair<ll,ll>
#define VP vector< pii >
#define MOD 1073741824
#define mp make_pair
#define pb push_back
#define rep(i,a,b) for(ll (i) = (a); (i) < (b); (i)++)
#define all(v) (v).begin(),(v).end()
#define S(x) scanf("%d",&(x))
#define S2(x,y) scanf("%d%d",&(x),&(y))
#define SL(x) scanf("%lld",&(x))
#define SL2(x) scanf("%lld%lld",&(x),&(y))
#define P(x) printf("%d\n",(x))
#define FF first
#define SS second
using namespace std;

int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a,b,c;
cin>>a>>b>>c;
ll div[a*b*c+1];
rep(i,1,a*b*c)
	{
		for(ll j=1;j*i<=a*b*c;j++)
				{
					div[i*j]++;
				}
	}
ll ans=0;
for(ll k=1;k<=c;k++)
{
	for(ll j=1;j<=b;j++)
			{
				for(ll i=1;i<=a;i++)
						{
							ll num=i*j*k;
							ans+=div[num]%MOD;
						}
			}

}
cout<<ans%MOD;

return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include<cmath>
#include <cctype>
using namespace std;
int divisors(int x) {
	int limit = x;
	int numberOfDivisors = 0;

	if (x == 1) return 1;

	for (int i = 1; i < limit; ++i) {
		if (x % i == 0) {
			limit = x / i;
			if (limit != i) {
				numberOfDivisors++;
			}
			numberOfDivisors++;
		}
	}

	return numberOfDivisors;
}
int main() {
	long long x, y, z, sum = 0;
	cin >> x >> y >> z;
	int *t = new int[x*y*z];
	fill(t, t + sizeof(t), 0);
	int k = 0;
	for (long long i = 1; i <= x; i++) {
		for (long long j = 1; j <= y; j++) {
			for (long long w = 1; w <= z; w++) {
				long long temp = w*j*i;
				if (t[temp] > 0) sum += t[temp];
				else {
					t[temp] = divisors(temp);
					sum += t[temp];
				}
			}
		}

	}
	cout << sum;
}

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <fstream>
#include <algorithm>
#include <list>
using namespace std;

const int N = 1073741824;
const int M =1000000;

typedef long long ll;
typedef long double ld;
int AR[1000008];

int main()
{
	ifstream ff("file.txt");
	int n, m,k;
	cin>>n>>m>>k;
	int ss;
	ll sum=0;
	int kol=0;
	for(int i = 1; i<=M; i++)
	{
		for(int j=1; j<=M; j+=i)
		{
			AR[j]++;
		}
	}
	for(int i=1; i<=n; i++)
	{
		for(int j=1; j<=m; j++)
		{
			for(int i1=1; i1<=k; i1++)
			{
				sum+=AR[j*1*i1];
			}
		}
	}

	cout<<sum<<endl;
	return 0;
}

#include <iostream>
#include <cstdio>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <string>
#include <queue>
#include <vector>
#include <iomanip>
#include <climits>
#include <ctime>
using namespace std;

int main()
{
    //cout << (1 << 30) << endl;
    int a, b, c;
    cin >> a >> b >> c;
    int d[1000050] = { 0 };
    for (int i = 1; i <= 1000; i++){
        for (int j = i; j <= 1000000; j+=i)
            d[j]++;
    }
    for (int i = 1001; i <= 1000000; i++)
        d[i]++;
    long long int ans = 0;
    for (int i = 1; i <= a; i++)
        for (int j = 1; j <= b; j++)
            for (int k = 1; k <= c; k++)
            {
                ans += d[i*j*k];
                ans = ans % (1 << 30);
            }
    cout << ans << endl;
    return 0;
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <string>

using namespace std;

int div(int n)
{
    int u,sum=0;

    for(u=1;u<=n;u++)
    {
        if(n%u==0)
        {
            sum=(sum+1)%1073741824;
        }
    }

    return sum;
}

int main()
{
    int a,b,c;
    cin>>a>>b>>c;

    long long int *p=new long long int[a*b*c+2];
    memset(p,0,sizeof(p));

    int i,j,k,w=0;
    for(i=1;i<=a;i++)
    {
        for(j=1;j<=b;j++)
        {
            for(k=1;k<=c;k++)
            {
                if(p[i*j*k]==0) p[i*j*k]=div(i*j*k);

                w=(w+p[i*j*k])%1073741824;
            }
        }
    }
    cout<<w%1073741824<<endl;
    return 0;
}

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>

using namespace std;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define epr(...) fprintf(stderr, __VA_ARGS__)
#define db(x) cerr << #x << " = " << x << endl
#define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n";
#define all(a) (a).begin(), (a).end()

#define equal equalll
#define less lesss
const int N = 2222;
const long long INF = 1e9 + 19;
const int BASE = 26;
//const int SZ = 1 << BASE;
//const int MOD = SZ - 1;
const int T = 1e7;

int a, b, c;
vector < int > pr;
int lp[N];
int mx;
long long table[N];
int res[N];

void read() {
    scanf("%d%d%d", &a, &b, &c);
}

long long code(int a, int b, int c, int t) {
    return (((a * mx + b) * 1ll * mx + c) * 1ll * mx + t);
}

unordered_map < long long, int > q;

int f(int a, int b, int c, int t) {
    if (a > b) swap(a, b);
    if (b > c) swap(b, c);
    if (a > b) swap(a, b);

    long long hash = code(a, b, c, t);
    if (t >= (int)pr.size()) return 1;
    int p = pr[t];
    if (p > a && p > b && p > c) return 1;
    if (q.count(hash) == 0) {
        int sum = 0;
        for (int i = 0, da = 1; da <= a; da *= p, i++)
            for (int j = 0, db = 1; db <= b; db *= p, j++)
                for (int k = 0, dc = 1; dc <= c; dc *= p, k++) {
                    sum += f(a / da, b / db, c / dc, t + 1) * (i + j + k + 1);
                }
        q[hash] = sum;
    }
    return q[hash];
}

long long code(int a, int b, int c) {
    return ((a * mx + b) * 1ll * mx + c);
}
void decode(long long x, int & a, int & b, int & c) {
    c = x % mx;
    x /= mx;
    b = x % mx;
    x /= mx;
    a = x;
}

pair < long long, int > dp1[T];
pair < long long, int > dp2[T];

void solve() {
    //q.reserve(18 * 1000 * 1000);
    mx = max(max(a, b), c);
    mx++;
    mx += 30;
    for (int i = 2; i <= mx; i++) {
        if (lp[i] == 0) {
            lp[i] = i;
            pr.pb(i);
        }
        for (int j = 0; j < (int)pr.size() && lp[i] >= pr[j] && i * pr[j] <= mx; j++)
            lp[i * pr[j]] = pr[j];
    }
    //db(pr.size());
    //set < int > tmp;
    //for (auto x: pr)
        //tmp.insert(2000 / x);
    //db(tmp.size());

    //int answer = f(a, b, c, 0);
    //int cur1 = 0;
    //dp1[cur1++] = mp(code(a, b, c), 1);
    int answer2 = 0;
    unordered_map < long long, int > q1, q2;
    q1[code(a, b, c)] = 1;
    for (int i = 0; i + 1 < (int)pr.size(); i++) {
        //int cur2 = 0;
        int p = pr[i];
        //for (int j = 0; j < cur1; j++) {
            //int a, b, c;
            //decode(dp1[j].fr, a, b, c);
            ////cerr << "a b c cof: " << a << " " << b << " " << c << " " << dp1[j].sc << endl;
        //}
        //for (int j = 0; j < cur1; j++) {
        q2.clear();
        q2.reserve(250 * 1000);
        //db2(pr[i], q1.size());
        for (auto g: q1) {
            int a, b, c;
            decode(g.fr, a, b, c);
            if (a < p && b < p && c < p) {
                answer2 += g.sc;
                continue;
            }
            for (int x = 0, da = 1; da <= a; x++, da *= p)
                for (int y = 0, db = 1; db <= b; y++, db *= p)
                    for (int z = 0, dc = 1; dc <= c; z++, dc *= p)  {
                        int a1 = a / da;
                        int b1 = b / db;
                        int c1 = c / dc;
                        if (a1 > b1) swap(a1, b1);
                        if (b1 > c1) swap(b1, c1);
                        if (a1 > b1) swap(a1, b1);
                        //if (a1 < pr[i + 1] && b1 < pr[i + 1] && c1 < pr[i + 1]) {
                            //answer2 += dp1[j].sc * (x + y + z + 1);
                        //}
                        //else {
                        if (a1 < pr[i + 1]) a1 = 1;
                        if (b1 < pr[i + 1]) b1 = 1;
                        if (c1 < pr[i + 1]) c1 = 1;

                        q2[code(a1, b1, c1)] += g.sc * (x + y + z + 1);
                        //}
                    }
        }
        swap(q1, q2);
        //sort(dp2, dp2 + cur2);
        //cur1 = 0;
        //for (int j = 0; j < cur2; ) {
            //int k = j;
            //int sum = 0;
            //for (; j < cur2 && dp2[k].fr == dp2[j].fr; sum += dp2[j].sc, j++);
            //assert(sum != 0);
            //dp1[cur1++] = mp(dp2[k].fr, sum);
        //}
        //cerr << p << "          ";
        //db2(cur1, cur2);
        //cerr << clock() * 1.0 / CLOCKS_PER_SEC << endl;
   }
    //db2(answer, answer2);
    //cerr << clock() * 1.0 / CLOCKS_PER_SEC << endl;
    //db(q.size());
    answer2 &= (1 << 30) - 1;
    printf("%d\n", answer2);
}

void stress() {

}

int main(){
#ifdef DEBUG
    freopen("in", "r", stdin);
    //freopen("out", "w", stdout);
#endif
    if (1) {
        int k = 1;
        for (int tt = 0; tt < k; tt++) {
            read();
            solve();
        }
    }
    else {
        stress();
    }

    return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define MAX 1000003
#define pii pair<ll,ll>
#define VP vector< pii >
#define MOD 1073741824
#define mp make_pair
#define pb push_back
#define rep(i,a,b) for(ll (i) = (a); (i) < (b); (i)++)
#define all(v) (v).begin(),(v).end()
#define S(x) scanf("%d",&(x))
#define S2(x,y) scanf("%d%d",&(x),&(y))
#define SL(x) scanf("%lld",&(x))
#define SL2(x) scanf("%lld%lld",&(x),&(y))
#define P(x) printf("%d\n",(x))
#define FF first
#define SS second
using namespace std;

int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a,b,c;
cin>>a>>b>>c;
ll div[1000001];
rep(i,1,1000001)
	{
		for(ll j=1;j*i<=100000;j++)
				{
					div[i*j]++;
				}
	}
ll ans=0;
for(ll k=1;k<=c;k++)
{
	for(ll j=1;j<=b;j++)
			{
				for(ll i=1;i<=a;i++)
						{
							ll num=i*j*k;
							ans+=div[num]%MOD;
						}
			}

}
cout<<ans%MOD;

return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int m[1000001];

long long d(long long n)
{
	if (m[n]>0) return m[n];
	int div=0;
	for (int i=1;i<=sqrt(n);i++)
		if (n%i==0) div++;
	div*=2;
	if (sqrt(n)*sqrt(n)==n) div--;
	m[n]=div;
	return div;
}

int main ()
{
	int a,b,c;
	long long sum=0;
	cin >> a >> b >> c;
	for (int i=1;i<=a;i++)
		for (int j=1;j<=b;j++)
			for (int k=1;k<=c;k++)
				sum=(sum+d(i*j*k))%1073741824;
	cout << sum << endl;
}

#include <iostream>
#include <bits/stdc++.h>
#define pi pair<int,int>
#define MP make_pair
#define PB push_back
#define vi vector<int>
#define vii vector<pi>
#define viii vector<pair<pair<int,int>,int>>
#define piii pair<pair<int,int>,int>
#define lim 100000
int mod = 1<<30;
using namespace std;
const int N = 200;
int dv[lim+1];

int main(void)
{

	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	for(int i=2;i<=lim;i++)//first loop
	for(int j=i;j<=lim;j=j+i)//second loop
		dv[j]++;//storing count
	int sum = 0;
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
				sum = (sum+dv[i*j*k]+1)%mod;
	printf("%d",sum);
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <stack>
#include <iomanip>

using namespace std;

#define IO ios::sync_with_stdio(0);cin.tie(0);

int main() {
     IO
    int s[1000001];
    for (int i = 1; i <= 1000000; i++)
        for (int j = i; j <= 1000000; j += i)
            s[j]++;

    int a,b,c;
    cin >> a >> b >> c;

    int ans = 0;
    for (int i = 1; i <= a; i++)
        for (int j = 1; j <= b; j++)
            for (int k = 1; k <= c; k++) {
                ans += s[i*j*k];

            }

    cout << ans;
}

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int mod = 1073741824;
const int M = 2005;
int g[M][M];//存每两个数的GCD();
int mu[M], prime[M];
bool vis[M];
int gcd(int a, int b)
{
    return b == 0 ? a : gcd(b, a%b);
}

void get_mu(int n)
{
    memset(vis, 0, sizeof(vis));
    memset(mu, 0, sizeof(mu));
    mu[1] = 1;
    int cnt = 0;
    for(int i = 2; i<=n; i++){
        if(!vis[i]){
            mu[i] = -1;
            prime[++cnt] = i;
        }
        for(int j = 1; j<=cnt && i*prime[j]<=n; j++){
            vis[i*prime[j]] = 1;
            if(i%prime[j] == 0) break;
            mu[i*prime[j]] = -mu[i];
        }
    }
}

int F(int n, int m, int d)
{
    int ans = 0;
    for(int i = 1; i<=n; i++){
        if(g[i*d][m] == 1){
            ans += n/i;
        }
    }
    return ans;
}

int main()
{
    int a[3], n, m, k;
    scanf("%d%d%d", &a[0], &a[1], &a[2]);
    sort(a, a+3);
    n = a[0], m = a[1], k = a[2];
    get_mu(k);
    for(int i = 1; i<=M-5; i++){
        for(int j = 1; j<=M-5; j++){
            g[i][j] = g[j][i] = gcd(i, j);
        }
    }
    int ans = 0;
    for(int z = 1; z<=k; z++){
        for(int d = 1; d<=n; d++){
            ans = (ans +1ll*(k/z)*mu[d]*F(n/d, z, d)*F(m/d, z, d))%mod;
        }
    }
    printf("%d\n", ans);
    return 0;
}

#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#include<bits/stdc++.h>
#define ll long long
#define M 1000000007
#define re register
using namespace std;
int n,m,T,ip[100002],num,mu[100002],A,B,C,mx,head[100002],tot,vis[100002],cnt;
vector<int>v[100002];
inline int read(){
	re int t=0;re char v=getchar();
	while(v<'0')v=getchar();
	while(v>='0')t=(t<<3)+(t<<1)+v-48,v=getchar();
	return t;
}
struct Edge{int x,y,l;}E[3500002];
ll du[100002],s1[100002],s2[100002],s3[100002];
struct edge{int next,to,l;}e[3500002];
inline void add(int x,int y,int z){
    e[++tot]=(edge){head[x],y,z};
    head[x]=tot;
}
inline int check(int a,int b,int c,int x,int y,int Z){
    return mu[a]*mu[b]*mu[c]*(s1[x]*s2[y]%M*s3[Z])%M;
}
int main(){
	mu[1]=1;
	for(re int i=2;i<=100000;++i)
		if(!ip[i]){
			mu[i]=1;
			for(re int j=1;j*i<=100000;++j){
				ip[i*j]=1,v[j*i].push_back(i);
				if(j%i)mu[i*j]=-mu[j];}
			}A=read();B=read();C=read();
		mx=max(max(A,B),C);
		for(re int i=1;i<=mx;++i){
			s1[i]=s2[i]=s3[i]=0;
			for(re int j=i;j<=mx;j+=i)(s1[i]+=A/j)%=M,(s2[i]+=B/j)%=M,(s3[i]+=C/j)%=M;
   	 	}
		for(re int i=1;i<=mx;++i){
			if(!mu[i])continue;
			re int tot=v[i].size();
			for(int j=0;j<(1<<tot);j++){
				int x=1,now=j;for(int k=0;k<tot;k++,now>>=1)if(now&1)x*=v[i][k];
				for(int k=j;;k=(k-1)&j){
					re int g=1,tmp=k;
					for(re int h=0;h<tot;++h,tmp>>=1)if(tmp&1)g*=v[i][h];
					re int y=(ll)i*g/x;
					if(x<y)E[++cnt]=(Edge){x,y,i},++du[x],++du[y];
					if(!k)break;
				}
			}
		}
		for(re int i=1;i<=cnt;++i){
			if(du[E[i].x]>=du[E[i].y])add(E[i].x,E[i].y,E[i].l);
			else add(E[i].y,E[i].x,E[i].l);
		}
		re ll ans=0;
		for(re int i=1;i<=mx;++i){
			for(re int j=head[i];j;j=e[j].next)vis[e[j].to]=e[j].l;
			for(re int j=head[i];j;j=e[j].next){
				re int u=e[j].to,l=e[j].l;
				for(re int k=head[u];k;k=e[k].next)
					if(vis[e[k].to]){
						re int A_B=l,A_C=vis[e[k].to],B_C=e[k].l;
						(ans+=((ll)check(i,u,e[k].to,A_B,A_C,B_C)+check(i,e[k].to,u,A_C,A_B,B_C)+check(u,i,e[k].to,A_B,B_C,A_C)+check(u,e[k].to,i,B_C,A_B,A_C)+check(e[k].to,i,u,A_C,B_C,A_B)+check(e[k].to,u,i,B_C,A_C,A_B))%M)%=M;
					}
			}
			for(re int j=head[i];j;j=e[j].next)vis[e[j].to]=0;
		}
		for(re int i=1;i<=mx;++i)if(mu[i])for(re int j=head[i];j;j=e[j].next)(ans+=((ll)check(i,i,e[j].to,i,e[j].l,e[j].l)+check(i,e[j].to,i,e[j].l,i,e[j].l)+check(e[j].to,i,i,e[j].l,e[j].l,i)+check(i,e[j].to,e[j].to,e[j].l,e[j].l,e[j].to)+check(e[j].to,e[j].to,i,e[j].to,e[j].l,e[j].l)+check(e[j].to,i,e[j].to,e[j].l,e[j].to,e[j].l))%M)%=M;
		for(re int i=1;i<=mx;++i)if(mu[i])(ans+=check(i,i,i,i,i,i))%=M;
		printf("%d\n",ans<0?ans+M:ans);
}

#include <bits/stdc++.h>

using namespace std;

void judge() { freopen("exam.in", "r", stdin); freopen("exam.out", "w", stdout); }

typedef unsigned int u32;

const int maxn = 5e3 + 10;

struct edge {
	int u, w;

	edge() {}
	edge(int u, int w): u(u), w(w) {}
} ;

int N, A, B, C, deg[maxn], lst[maxn], s[maxn];
vector<int> V;
u32 ans, fa[maxn], fb[maxn], fc[maxn], mu[maxn];
vector<edge> g[maxn];

int gcd(int a, int b) {
	while(b) { int t = b; b = a % b; a = t; }
	return a;
}

void prepare() {
	static int pme[maxn], p_n; p_n = 0;
	static bool isp[maxn];
	for (int i = 2; i <= N; ++i) isp[i] = 1;
	mu[1] = 1;
	for (int i = 2; i <= N; ++i) {
		if(isp[i]) pme[p_n++] = i, mu[i] = -1;
		for (int j = 0; j < p_n; ++j) {
			int &p = pme[j], x = p * i;
			if(x > N) break;
			isp[x] = 0;
			if(i % p == 0) break;
			mu[x] = -mu[i];
		}
	}
	return;
}

void add_edge(int u, int v, int w) { g[u].push_back(edge(v, w)); ++deg[u]; }
void add_biedge(int u, int v, int w) { add_edge(u, v, w); add_edge(v, u, w); }

u32 G(int a, int b, int c) {
	return \
	fa[a] * fb[b] * fc[c] + \
	fa[a] * fb[c] * fc[b] + \
	fa[b] * fb[a] * fc[c] + \
	fa[b] * fb[c] * fc[a] + \
	fa[c] * fb[a] * fc[b] + \
	fa[c] * fb[b] * fc[a];
}

int main() {
	judge();
	scanf("%d%d%d", &A, &B, &C); N = max(A, max(B, C)); prepare();
	for (int i = 1; i <= N; ++i) for (int j = i; j <= N; j += i) fa[i] += A / j, fb[i] += B / j, fc[i] += C / j;
	for (int i = 1; i <= N; ++i) ans += mu[i] * mu[i] * mu[i] * fa[i] * fb[i] * fc[i];
	for (int x = 1; x <= N; ++x) for (int y = 1; x * y <= N; ++y) if(mu[x * y]) for (int z = 1; x * y * z <= N; ++z) if(gcd(y, z) == 1 && y != z && mu[x * z]) {
		ans += mu[x * y] * mu[x * z] * mu[x * z] * (fa[x * y * z] * fb[x * z] * fc[x * y * z] + fa[x * y * z] * fb[x * y * z] * fc[x * z] + fa[x * z] * fb[x * y * z] * fc[x * y * z]);
		if(y < z) add_biedge(x * y, x * z, x * y * z);
	}
	for (int v = 1; v <= N; ++v) V.push_back(v), sort(g[v].begin(), g[v].end(), [&](edge a, edge b) { return deg[a.u] == deg[b.u] ? a.u > b.u : deg[a.u] > deg[b.u]; });
	sort(V.begin(), V.end(), [&](int u, int v) { return deg[u] == deg[v] ? u > v : deg[u] > deg[v]; });
	for (int u: V) for (auto e: g[u]) {
		int v = e.u;
		if(deg[v] < deg[u] || deg[v] == deg[u] && v < u) break;
		if(lst[v] != u) lst[v] = u; s[v] = e.w;
		for (auto ee: g[v]) {
			int w = ee.u;
			if(deg[w] < deg[v] || deg[w] == deg[v] && w < v) break;
			if(lst[w] == u) {
				ans += mu[u] * mu[v] * mu[w] * G(s[w], e.w, ee.w);
			}
		}
	}
	printf("%u\n", ans);
	return 0;
}

#include <cstdio>
#include <sstream>
#include <iostream>

#include <set>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <string>
#include <complex>
#include <cstring>

#include <ctime>
#include <cmath>
#include <cstdlib>
#include <algorithm>
using namespace std;

#define FOR(i,n) for (int i = 1; i <= (n); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPI(i,c) for (typeof(c.begin()) i = c.begin(); i != c.end(); ++i)
#define ALL(c) c.begin(), c.end()
#define SZ(x) ((int)(x).size())
#define MP make_pair

#define DB(x) cout << #x << " = " << x << endl;
#define CK(x) if(!(x)) cout << '(' << #x << ") is false!!!" << endl;

typedef long long int64;
typedef unsigned long long uint64;
typedef complex<int> point;
typedef pair<int, int> pii;
typedef vector<int> vi;

const int INF = 1 << 30;
const double EPS = 1e-7;

int primes[5] = {2,3,5,7,11};
int mod = 1073741824;
int64 cant(int i, int j, int k)
{
	int64 ans = 1;
	for(int h = 0; h < 5; h++)
	{
		int64 c = 0;
		while(i%primes[h]==0)
		{
			i/=primes[h];
			c++;
		}
		while(j%primes[h]==0)
		{
			j/=primes[h];
			c++;
		}
		while(k%primes[h]==0)
		{
			k/=primes[h];
			c++;
		}
		ans*=(c+1);
		ans%= mod;
	}
	if(i>1)ans = (ans*2)%mod;
	if(j>1)ans = (ans*2)%mod;
	if(k>1)ans = (ans*2)%mod;
	return ans;
}

int main()
{
	ios::sync_with_stdio(false);
	int a, b,c;
	cin>>a>>b>>c;
	int64 ans = 0;
	for(int i = 1; i<= a; i++)
		for(int j = 1; j<= b; j++)
			for(int k = 1; k<= c; k++)
				ans = (ans+cant(i,j,k))%mod;
	cout<<ans<<endl;
    return 0;
}// UH++

#include <bits/stdc++.h>

using namespace std;

int np[1000001];

int main(){
    const int m = 1 << 29;
    for(int i = 2; i <= 1000; i++){
        for(int j = i; j <= 1000000; j += i){
            np[j] += 2;
        }
    }
    int A, B, C;
    cin >> A >> B >> C;
    long long sm = 0;
    for(int a = 1; a <= A; a++){
        for(int b = 1; b <= B; b++){
            for(int c = 1; c <= C; c++){
                sm = (sm + (np[a * b * c]) % m) % m;
            }
        }
    }
    cout << sm;
}

#include <iostream>
#include <vector>
using namespace std;
int main(){
    int a, b, c;
    cin>>a>>b>>c;
    vector <int> mat(a*b*c+1, -1);
    for (int i=1;i<=a;i++)
        for (int j=1;j<=b;j++)
            for (int k=1;k<=c;k++)
                if (mat[i*j*k]<0)
                    for (int j=1;j*j<=i;j++){
                        if (i%j==0){
                            mat[i]++;
                            if (j*j!=i)
                                mat[i]++;
                        }
                    }

    int ans=0;
    for (int i=1;i<=a;i++)
        for(int j=1;j<=b;j++)
            for (int k=1;k<=c;k++)
                ans=(ans+mat[i*j*k])%1073741824;
    cout<<ans;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;
typedef  long long int ll;

ll find_divisor(ll i){
    ll div=0;
    ll sqrti=sqrt(i);
    for(ll j=1;j<=sqrti;j++){
        if(i%j==0){
            if(j*j==i){
                div++;
            }
            else div+=2;
        }
    }
    return div;

}

  int main(){

ll i,j,k;
cin>>i>>j>>k;
ll sum=0;
ll arr[1000000];
for(ll l=1;l<=i;l++){
    for(ll m=1;m<=j;m++){
        for(ll n=1;n<=k;n++){
        if(arr[l*m*n]==0)arr[l*m*n]=find_divisor(l*m*n);

            sum+=arr[l*m*n];
        }
    }
}cout<<sum;
  }

/* ********************************************
*    *     *      *    * * * *     * * * *    *
*   * *   * *   ***    *     *    *       *   *
*   *  * *  *  ****    * * *      *       *   *
*   *   *   *     *    * *        *       *   *
*   *       *     *    *  *       *       *   *
*   *       *     *    *   *      *       *   *
*   *       *     *    *    *      * * * *    *
********************************************* */
#include <fstream>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>
/////////////////////
#define MP make_pair
#define FOR(v,p,k) for(int v=p;v<=k;++v)
#define FORD(v,p,k) for(int v=p;v>=k;--v)
#define REP(i,n) for(int i=0;i<(n);++i)
#define VAR(v,i) __typeof(i) v=(i)
#define FOREACH(i,c) for(__typeof(c.begin()) i=(c.begin());i!=(c).end();++i)
#define PB push_back
#define FI first
#define SE second
#define ABS(x)(x < 0)?(-x):(x)
#define SIZE(x) (int)x.size()
#define ALL(c) c.begin(),c.end()
#define MAX(a,b)(a > b)?(a):(b)
#define MIN(a,b)(a > b)?(b):(a)
#define ZERO(x) memset(x,0,sizeof(x))
#define PI acos(-1)
#define eps 1e-13
#define MOD 1073741824

using namespace std;
typedef long long LL;
const int NMAX = 1000005;

int a , b , c , i , j , k , d[NMAX];
LL ans = 0;

int main(){
  //freopen("INPUT.TXT","r",stdin);
  //freopen("OUTPUT.TXT","w",stdout);
  FOR(i,1,1000000)
    for(j = i ; j < 1000000 ; j += i)
      d[j]++;
  cin >> a >> b >> c;
  FOR(i,1,a)
   FOR(j,1,b)
    FOR(k,1,c){
      ans += d[i * j * k];
    }
    cout << ans << endl;
  return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int m[1000001];

int d(long long n)
{
	if (m[n]>0) return m[n];
	int div=0;
	for (int i=1;i<=sqrt(n);i++)
		if (n%i==0) div++;
	div*=2;
	if (sqrt(n)*sqrt(n)==n) div--;
	m[n]=div;
	return div;
}

int main ()
{
	int a,b,c;
	int sum=0;
	cin >> a >> b >> c;
	for (int i=1;i<=a;i++)
		for (int j=1;j<=b;j++)
			for (int k=1;k<=c;k++)
				sum=(sum+d(i*j*k))%1073741824;
	cout << sum << endl;
}

#include <bits/stdc++.h>
using namespace std;

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

int a,b,c;
cin>>a>>b>>c;
int sum=0,num;
int freq[1000000];
memset(freq,0,sizeof(freq));
for(int i=1;i<=a;i++)
{
    for(int j=1;j<=b;j++)
    {
        for(int k=1;k<=c;k++)
        {
             num=i*j*k;
             if(freq[num]==0){

               for(int x=1;x<=sqrt(num);x++)
               {
                  if(num%x==0)
                  {
                    if(num/x==x)
                    freq[num]++;
                    else
                    freq[num]+=2;
                   }
                }
             }
            sum+=freq[num];
        }
    }
}
cout<<sum%1073741824;
}

#include<iostream>
using namespace std;
#include<math.h>
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int n=a*b*c;
	int y=1;
	long long o=0;
	int h=1,g=1,f=1;
	int i[n],j[n],k[n];
	int q=1,t=1,r=1;
	for(int l=0;l<n;l++)
	{
		if(h>b)
		{
			h=1;
			r++;

		}
		if(r>b)
		{
			r=1;
		}
		j[l]=r;
		h++;
	}
	for(int m=0;m<n;m++)
	{
	if(q>c)
	{
		q=1;
		g=1;
	}
		i[m]=g;
		g++;
		q++;
	}
	for(int b=0;b<n;b++)
	{
		if(t>n/2)
		{
			t=1;
			f++;
		}
		k[b]=f;
		t++;
	}

	int x;
	for(int a=0;a<n;a++)
	{ x=k[a]*j[a]*i[a];
	y=1;
	   while(y<=n)
	   {
	   	if(x%y==0)
	   	{
	   		o++;

		   }
		   y++;
	   }
	}

	long long  d=pow(2,30);
	o=o%d;
		cout<<o;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

const int maxn = 2010;
const int maxm = maxn * maxn;

int a, b, c, n, ans;
unsigned int g[maxm], miu[maxm];

int main(int argc, char const *argv[])
{
	scanf("%d%d%d", &a, &b, &c);
	for (int i = 1; i <= a; ++i)
	{
		for (int j = 1; j <= b; ++j)
		{
			++g[i * j];
		}
	}
	n = a * b;
	for (int i = 1; i <= n; ++i)
	{
		for (int j = i + i; j <= n; j += i)
		{
			g[i] += g[j];
		}
	}
	for (int i = 1; i <= n; ++i)
	{
		for (int j = i + i; j <= n; j += i)
		{
			g[i] += g[j];
		}
	}
	for (int i = 1; i <= c; ++i)
	{
		miu[i] = 1;
		int t = i;
		for (int j = 2; j * j <= t; ++j)
		{
			if (t % j == 0)
			{
				miu[i] *= -1;
				t /= j;
				if (t % j == 0)
				{
					miu[i] = 0;
					break;
				}
			}
		}
		if (t > 1)
		{
			miu[i] *= -1;
		}
	}
	for (int k = 1; k <= c; ++k)
	{
		for (int e = 1; e <= k; ++e)
		{
			if (k % e == 0)
			{
				for (int p = 1; p <= e; ++p)
				{
					if (e % p == 0)
					{
						ans += miu[p] * g[p];
					}
				}
			}
		}
	}
	printf("%d\n", ans % (1 << 30));
	return 0;
}

#include <iostream>
#include <math.h>
#include <string.h>
#include <string>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <map>
#include <list>
#include <queue>
#include <algorithm>
#include <bitset>

using namespace std;

#define REP(i,n) for(long long int i = 0; i < int(n); ++i)
#define REPV(i, n) for (long long int i = (n) - 1; (int)i >= 0; --i)
#define FOR(i, a, b) for(long long int i = (int)(a); i < (int)(b); ++i)

#define ALL(v) (v).begin(), (v).end()
#define PF push_front
#define PB push_back
#define MP make_pair
#define F first
#define S second

typedef long long int lli;

int p[1000010];
int d[1000010];

int dCnt(int n) {
	if (d[n])
		return d[n];
	if (p[n] == 0)
		return d[n] = 2;
	int res = 1;
	int nn = n;
	while (nn % p[n] == 0) {
		nn /= p[n];
		res++;
	}
	return d[n] = (res * dCnt(nn)) % (1 << 30);
}

int main()
{
#ifdef FILE_IO
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

	for(int i = 2; i < 1000000; i++)
		if (!p[i])
			for (int j = 2 * i; j < 1000000; j += i)
				p[j] = i;

	d[1] = 1;

	int a, b, c;
	cin >> a >> b >> c;
	lli sum = 0;
	for(int i = 1; i <= a; ++i) {
		for(int j = 1; j <= b; ++j) {
			for (int k = 1; k <= c; ++k) {
				sum += dCnt(i * j * k);
				sum %= 1073741824;
			}
		}
	}
	cout << sum;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ff              first
#define ss              second
#define ll             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)

long long d[1000010];
int main()
{
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int a,b,c,s=0;
    for(int i =1;i<=1000000;i++){
      for(int j=i;j<=1000000;j+=i){
        d[j]++;
      }
    }
    cin >> a >> b >>c;
    for(int i =1;i<=a;i++)
      for(int j=1;j<=b;j++)
        for(int k=1;k<=c;k++){
          s+=d[i*j*k];
        }

        cout << s;

}

/*
   _____                                ________         .__            __
  /  _  \_______  ______ ____   ____    \_____  \ _______|  |__   _____/  |_  _______  __
 /  /_\  \_  __ \/  ___// __ \ /    \    /   |   \\___   /  |  \_/ __ \   __\/  _ \  \/ /
/    |    \  | \/\___ \\  ___/|   |  \  /    |    \/    /|   Y  \  ___/|  | (  <_> )   /
\____|__  /__|  /____  >\___  >___|  /  \_______  /_____ \___|  /\___  >__|  \____/ \_/
        \/           \/     \/     \/           \/      \/    \/     \/
*/
#include <cstring>
#include <list>
#include <climits>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cassert>
#include <cctype>
#include <stdexcept>

/*
SU!*J4Ax
*/

#define sqr(x) (x * x)
#define cube(x) sqr(x) * (x)
#define endl "\n"
#define all(x) x.begin() , x.end()
#define fp pop_front
#define bp pop_back
#define pf push_front
#define pb push_back
#define mp make_pair
#define sz size()
#define se second
#define fi first
#define ull unsigned long long
#define ll long long
#define dd double
#define st string
#define bl bool
#define I int
#define ld long double
#define ch char
#define pi 3.14159265358979323846
#define inf 1e9 + 7

using namespace std;

const ll N = 2e2;

ll n, m, k, res, used[N];

int main () {
	for(ll i = 1; i <= N; ++i) {
    	for(ll j = i; j <= N; j += i) {
      		++used[j];
      	}
    }
	cin >> n >> m >> k;
	for(ll i = 1; i <= n; ++i) {
		for(ll j = 1; j <= m; ++j) {
			for(ll y = 1; y <= k; ++y) {
				res += used[i * j * y];
			}
		}
	}
	cout << res;
	return 0;
}

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<climits>
#include<cstdio>
#define M 1000000007
#define ll long long
#define pb push_back
using namespace std;
ll factMul[100001];
ll fastModPow(ll base,ll exp,ll p)
{
    if(exp == 0)
      return 1;
    ll res= fastModPow(base,exp/2,p);
    res = (res*res)%p;
    if(exp%2 == 0)
        return res;
    else
        return (res*(base%p))%p;

}
ll modInv(ll a,ll p)			// p has to be Prime
{
	return fastModPow(a,p-2,p);
}
ll digits(ll a)
{
	int s=0;
	while(a>0)a/=10,s++;
	return s;
}
int isPrime(ll n)
{
	for(int i=2;i*i<=n;i++)
		if(n%i==0)
			return 0;
	return 1;
}
int* sieveOfEra(int n)				//size of arr is one more;
{
	int* prime=new int[n+1];
	memset(prime,0,(n+1)*sizeof(int));
	prime[2]=0;
	for(int i=2;i*i<=n;i++)
	{
		if(prime[i]!=0)
			continue;
		else
		{
			for(int j=2*i;j<=n;j+=i)
				prime[j]=1;
		}
	}
	return prime;
}
ll gcd(ll a,ll b)			//a>=b
{
	if(b==0)
		return a;
	else
		return gcd(b,a%b);
}
ll gcdOfArr(ll* arr,int n)
{
	ll g=arr[0];
	for(int i=1;i<n;i++)
		g=gcd(g,arr[i]);
	return g;
}
void arrDivide(ll* arr,int d,int n)
{
	for(int i=0;i<n;i++)
		arr[i]/=d;
}
int parseInt(char* arr)
{
	int ans=0;
	int index=0;
	while(index<strlen(arr))
	{
		ans=ans*10+arr[index]-48;
		index++;
	}
	return ans;
}
int countOne(ll* arr,int size)
{
	int c=0;
	for(int i=0;i<size;i++)
		if(arr[i]==1)
			c++;
	return c;
}
void markPrimePow(ll* arr,int size)			//arr[2] willl be marks if 2 is prime
{
	for(int i=2;i<=size;i++)
	{
		if(isPrime(i))
		{
			int j=i;
			while(size>=j)
			{
				arr[j]=1;
				j*=i;
			}
		}
	}
}
ll findSum(ll* arr,int size,int start,int jump)
{
	ll s=0;
	for(int i=start;i<size;i+=jump)
		s+=arr[i];
	return s;
}
ll sum(ll* arr,int size)
{
	int s=0;
	for(int i=0;i<size;i++)
		s+=arr[i];
	return s;
}
int noOfDivisorsDistinct(ll a)
{
	int i=2;
	int div=0;
	while(a>1)
	{
		if(a%i==0)
			div++;
		while(a%i==0)
			a/=i;
		i++;
	}
	return div;
}
int noOfDivisors(ll a)
{
	int i=2;
	int div=1;
	while(a>1 && i*i<=a)
	{
		int temp=0;
		while(a%i==0)
			a/=i,temp++;
		div=div*(temp+1);
		i++;
	}
	if(a!=1)
		div*=2;
	return div;
}
int noOfDivisors2(ll a)
{
	int i=2;
	int div=1;
	while(a>1)
	{
		int temp=0;
		while(a%i==0)
			a/=i,temp++;
		div=div*(temp+1);
		i++;
	}
	return div;
}
void divisorUpdate(ll* arr,ll a)
{
	int i=2;
	while(a>1 && i*i<=a)
	{
		if(a%i==0)
			arr[i]++;
		while(a%i==0 && a>1)
			a/=i;
		i++;
	}
	if(a!=1)
		arr[a]++;
}
int prevPrime(int n)
{
	for(int i=n;;i--)
	{
		if(isPrime(i)==1)
			return i;
	}
}
int main()
{
	ll a,b,c;
	cin>>a>>b>>c;
	int* arr=new int[a*b*c+1];
	int sum=0,mod=(1<<30);
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
				if(arr[i*j*k]==0)
				{
					arr[i*j*k]=noOfDivisors(i*j*k);
					sum=(sum+arr[i*j*k])%mod;
				}
				else
					sum=(sum+arr[i*j*k])%mod;
	cout<<sum;

	return 0;
}

#include <iostream>
#include <bits/stdc++.h>

#define ll long long
#define PI 3.14159265
#define lp(n) for(int i= 0; i<(n) ; i++)
#define sz(v)   ((int)((v).size()))
#define rep (i,v)  for(int i=0;i<sz(v);i++)
#define clr(v,d) memset(v,d,sizeof(v))

using namespace std;

vector <int> dp (10e6+20,-1);
int divCount(int n){
    int &ret = dp[n];
    if(ret!= -1)
        return ret;
    int cnt=0;
    if(sqrt(n) * sqrt(n) == n)
        ++cnt;
    for(int i= 1; i < sqrt(n); i++)
        if(n%i==0) cnt+= 2;
    return ret=cnt;
}
int main() {
    cin.tie(0);
    cin.sync_with_stdio(0);
    int a,b,c; cin>>a>>b>>c;
    ll sol=0;
    for(int i=1; i <= a; i++){
        for(int j=1; j <= b; j++){
            for(int k=1; k <= c; k++)
                sol += divCount(i*j*k);
        }
    }

    cout<<sol% (int)2e30;
}

#include <cmath>
#include <iostream>

#define MAX 1000001

using namespace std;

int main(int argc, char ** argv) {
    int a, b, c, ans = 0;
    cin >> a >> b >> c;
    static int D[MAX] = {1, 1};
    for (int i = 1; i < a + 1; i++) {
        for (int j = 1; j < b + 1; j++) {
            for (int k = 1; k < c + 1; k++) {
                int l = i * j * k;
                if (!D[l]) {
                    long double sqi = pow(l, 0.5);
                    unsigned long long int sum = 0;
                    for (int m = 2; m < (int) sqi + 1; m++) {
                        if (!(l % m)) {
                            if (sqi == m) {
                                sum++;
                                continue;
                            }
                            sum += 2;
                        }
                    }
                    D[l] = sum + 2;
                }
                ans += D[l];
            }
        }
    }
    cout << ans % (1 << 31) << endl;
    return 0;
}

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <queue>
#include <deque>
#include <stack>
#include <vector>
#include <bitset>
#include <string>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <fstream>
#include <sstream>
#include <complex>
#include <iomanip>
#include <stdlib.h>
#include <iostream>
#include <algorithm>

#define Rloop(i,a,n) for(int i=(a)-1;i>=(n);--i)
#define loop(i,a,n) for(int i=(a);i<(n);++i)
#define all(v) ((v).begin()),((v).end())
#define ll long long
#define sz size()

const int OO = (ll) 2e9;
const double eps = 1e-9;
const ll MAX = 1000001;
const ll MOD = 1073741824;

using namespace std;

ll a, b, c, arr[MAX], sum;

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

    cin >> a >> b >> c;

    loop(i, 1, 500001) {
        loop(j, 0, 500001) {
            arr[i + j]++;
            j += i - 1;
        }

    }
//  loop(i, 0, 100)
    //  cout << arr[i] << ' ';

    loop(i, 1, a + 1) {
        loop(j, 1, b + 1) {
            loop(k, 1, c + 1) {
                ll tmp = i * j * k;
                //tmp %= MOD;
                //cout << tmp << endl;
                sum += arr[tmp];
                sum %= MOD;
            }
        }
    }

    cout << sum;
    return 0;
}