#include <bits/stdc++.h>
#define int long long
using namespace std;
const long long N=2000005, mod=1000000007;
int power(int a, int b, int p)
{
if(a==0)
return 0;
int res=1;
a%=p;
while(b>0)
{
if(b&1)
res=(1ll*res*a)%p;
b>>=1;
a=(1ll*a*a)%p;
}
return res;
}
int pref[N], inv[N], pref2[N], hp2[N];
// Returns (1/l + 1/(l+1) + ... + 1/r)
int cal(int l, int r)
{
if(l>r)
return 0;
return (pref[r]-pref[l-1]+mod)%mod;
}
// Returns (1/(l*(l+1)) + ... + 1/(r(r+1)))
int cal2(int l, int r)
{
if(l>r)
return 0;
return (pref2[r]-pref2[l-1]+mod)%mod;
}
void pre()
{
pref[0]=0;
pref2[0]=0;
for(int i=1;i<N;i++)
{
inv[i]=power(i, mod-2, mod);
pref[i]=(pref[i-1]+inv[i])%mod;
int mul2=(i*(i+1))%mod;
pref2[i]=(pref2[i-1] + power(mul2, mod-2, mod))%mod;
hp2[i]=((i*(i-1))%mod)%mod;
}
}
int solve2(int n, int m, int k)
{
if((n*m)<k)
return 0;
int ans=0;
int reqv=(k-1)/n;
if(reqv<m)
{
int prob=(reqv*inv[reqv+n-1])%mod;
int exp=(prob*(1ll + cal(n+reqv, m+n-2)))%mod;
ans=(ans + exp)%mod;
}
int reqh=(k-1)/m;
if(reqh<n)
{
int prob=(reqh*inv[reqh+m-1])%mod;
int exp=(prob*(1ll + cal(m+reqh, m+n-2)))%mod;
ans=(ans + exp)%mod;
}
for(int i=1;i<min(n, k);i++)
{
reqv=(k-1)/i;
if(reqv>=m)
continue;
int prob=(inv[i+reqv]*reqv)%mod;
prob=(prob*inv[i-1+reqv])%mod;
int num1=(hp2[i+reqv+1]*cal2(i+reqv, i+m-2))%mod;
int num2=((i+reqv+1)*cal(i+reqv+1, i+m-1))%mod;
int num=((num1+num2)*inv[i+reqv+1])%mod;
int exp=(prob*(2ll + cal(i+reqv+1, reqv+(n-1))+num))%mod;
ans=(ans + exp)%mod;
}
for(int i=1;i<min(m, k);i++)
{
reqh=(k-1)/i;
if(reqh>=n)
continue;
int prob=(inv[i+reqh]*reqh)%mod;
prob=(prob*inv[i-1+reqh])%mod;
// Sum for cases when the (reqh+i)th horizontal line comes in the gap b/w x_v and y1_h
int num1=(hp2[i+reqh+1]*cal2(i+reqh, i+n-2))%mod;
// Sum for cases when the (reqh+i)th horizontal line comes in the gap to the left of x_v
int num2=((i+reqh+1)*cal(i+reqh+1, i+n-1))%mod;
int num=((num1+num2)*inv[i+reqh+1])%mod;
int exp=(prob*(2ll + cal(i+reqh+1, reqh+(m-1))+num))%mod;
ans=(ans + exp)%mod;
}
return ans;
}
int32_t main()
{
pre();
int n, m, k;
cin>>n>>m>>k;
cout<<solve2(n, m, k);
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+ICAgICAgICAgICAgICAgICAgICAKI2RlZmluZSBpbnQgbG9uZyBsb25nICAgIAp1c2luZyBuYW1lc3BhY2Ugc3RkOwpjb25zdCBsb25nIGxvbmcgTj0yMDAwMDA1LCBtb2Q9MTAwMDAwMDAwNzsKCmludCBwb3dlcihpbnQgYSwgaW50IGIsIGludCBwKQp7CiAgICBpZihhPT0wKQogICAgcmV0dXJuIDA7CiAgICBpbnQgcmVzPTE7CiAgICBhJT1wOwogICAgd2hpbGUoYj4wKQogICAgewogICAgICAgIGlmKGImMSkKICAgICAgICByZXM9KDFsbCpyZXMqYSklcDsKICAgICAgICBiPj49MTsKICAgICAgICBhPSgxbGwqYSphKSVwOwogICAgfQogICAgcmV0dXJuIHJlczsKfQoKaW50IHByZWZbTl0sIGludltOXSwgcHJlZjJbTl0sIGhwMltOXTsKCi8vIFJldHVybnMgKDEvbCArIDEvKGwrMSkgKyAuLi4gKyAxL3IpCmludCBjYWwoaW50IGwsIGludCByKQp7CiAgICBpZihsPnIpCiAgICAgICAgcmV0dXJuIDA7CiAgICByZXR1cm4gKHByZWZbcl0tcHJlZltsLTFdK21vZCklbW9kOwp9CgovLyBSZXR1cm5zICgxLyhsKihsKzEpKSArIC4uLiArIDEvKHIocisxKSkpCmludCBjYWwyKGludCBsLCBpbnQgcikKewogICAgaWYobD5yKQogICAgICAgIHJldHVybiAwOwogICAgcmV0dXJuIChwcmVmMltyXS1wcmVmMltsLTFdK21vZCklbW9kOwp9CnZvaWQgcHJlKCkKewogICAgcHJlZlswXT0wOwogICAgcHJlZjJbMF09MDsKICAgIGZvcihpbnQgaT0xO2k8TjtpKyspCiAgICB7CiAgICAgICAgaW52W2ldPXBvd2VyKGksIG1vZC0yLCBtb2QpOwogICAgICAgIHByZWZbaV09KHByZWZbaS0xXStpbnZbaV0pJW1vZDsKICAgICAgICBpbnQgbXVsMj0oaSooaSsxKSklbW9kOwogICAgICAgIHByZWYyW2ldPShwcmVmMltpLTFdICsgcG93ZXIobXVsMiwgbW9kLTIsIG1vZCkpJW1vZDsKICAgICAgICBocDJbaV09KChpKihpLTEpKSVtb2QpJW1vZDsKICAgIH0KfQppbnQgc29sdmUyKGludCBuLCBpbnQgbSwgaW50IGspCnsKICAgIGlmKChuKm0pPGspCiAgICAgICAgcmV0dXJuIDA7CiAgICBpbnQgYW5zPTA7CiAgICBpbnQgcmVxdj0oay0xKS9uOwogICAgaWYocmVxdjxtKQogICAgewogICAgICAgIGludCBwcm9iPShyZXF2KmludltyZXF2K24tMV0pJW1vZDsKICAgICAgICBpbnQgZXhwPShwcm9iKigxbGwgKyBjYWwobityZXF2LCBtK24tMikpKSVtb2Q7CiAgICAgICAgYW5zPShhbnMgKyBleHApJW1vZDsKICAgIH0KICAgIGludCByZXFoPShrLTEpL207CiAgICBpZihyZXFoPG4pCiAgICB7CiAgICAgICAgaW50IHByb2I9KHJlcWgqaW52W3JlcWgrbS0xXSklbW9kOwogICAgICAgIGludCBleHA9KHByb2IqKDFsbCArIGNhbChtK3JlcWgsIG0rbi0yKSkpJW1vZDsKICAgICAgICBhbnM9KGFucyArIGV4cCklbW9kOwogICAgfQogICAgZm9yKGludCBpPTE7aTxtaW4obiwgayk7aSsrKQogICAgewogICAgICAgIHJlcXY9KGstMSkvaTsKICAgICAgICBpZihyZXF2Pj1tKQogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICBpbnQgcHJvYj0oaW52W2krcmVxdl0qcmVxdiklbW9kOwogICAgICAgIHByb2I9KHByb2IqaW52W2ktMStyZXF2XSklbW9kOwogICAgICAgIGludCBudW0xPShocDJbaStyZXF2KzFdKmNhbDIoaStyZXF2LCBpK20tMikpJW1vZDsKICAgICAgICBpbnQgbnVtMj0oKGkrcmVxdisxKSpjYWwoaStyZXF2KzEsIGkrbS0xKSklbW9kOwogICAgICAgIGludCBudW09KChudW0xK251bTIpKmludltpK3JlcXYrMV0pJW1vZDsKICAgICAgICBpbnQgZXhwPShwcm9iKigybGwgKyBjYWwoaStyZXF2KzEsIHJlcXYrKG4tMSkpK251bSkpJW1vZDsKICAgICAgICBhbnM9KGFucyArIGV4cCklbW9kOwogICAgfQogICAgZm9yKGludCBpPTE7aTxtaW4obSwgayk7aSsrKQogICAgewogICAgICAgIHJlcWg9KGstMSkvaTsKICAgICAgICBpZihyZXFoPj1uKQogICAgICAgICAgICBjb250aW51ZTsKICAgICAgICBpbnQgcHJvYj0oaW52W2krcmVxaF0qcmVxaCklbW9kOwogICAgICAgIHByb2I9KHByb2IqaW52W2ktMStyZXFoXSklbW9kOwogICAgICAgIC8vIFN1bSBmb3IgY2FzZXMgd2hlbiB0aGUgKHJlcWgraSl0aCBob3Jpem9udGFsIGxpbmUgY29tZXMgaW4gdGhlIGdhcCBiL3cgeF92IGFuZCB5MV9oCiAgICAgICAgaW50IG51bTE9KGhwMltpK3JlcWgrMV0qY2FsMihpK3JlcWgsIGkrbi0yKSklbW9kOwogICAgICAgIC8vIFN1bSBmb3IgY2FzZXMgd2hlbiB0aGUgKHJlcWgraSl0aCBob3Jpem9udGFsIGxpbmUgY29tZXMgaW4gdGhlIGdhcCB0byB0aGUgbGVmdCBvZiB4X3YKICAgICAgICBpbnQgbnVtMj0oKGkrcmVxaCsxKSpjYWwoaStyZXFoKzEsIGkrbi0xKSklbW9kOwogICAgICAgIGludCBudW09KChudW0xK251bTIpKmludltpK3JlcWgrMV0pJW1vZDsKICAgICAgICBpbnQgZXhwPShwcm9iKigybGwgKyBjYWwoaStyZXFoKzEsIHJlcWgrKG0tMSkpK251bSkpJW1vZDsKICAgICAgICBhbnM9KGFucyArIGV4cCklbW9kOwogICAgfQogICAgcmV0dXJuIGFuczsKfQppbnQzMl90IG1haW4oKQp7CiAgICBwcmUoKTsKICAgIGludCBuLCBtLCBrOwogICAgY2luPj5uPj5tPj5rOwogICAgY291dDw8c29sdmUyKG4sIG0sIGspOwp9