#include <iostream>
#include <vector>
#include <algorithm>
typedef long long ll;
std::vector<int> divisors(int k) {
std::vector<int> answer{1}, stack{k};
for (int i = 2; i * i <= k; ++i) {
const int j = k / i;
if (j * i == k) {
answer.push_back(i);
stack.push_back(j);
}
}
while (stack.back() == answer.back()) stack.pop_back();
while (!stack.empty()) { answer.push_back(stack.back()); stack.pop_back(); }
return answer;
}
const int mod = (int)1e9+7;
int main() {
int n, m, k;
std::cin >> n >> m >> k;
int answer = 0;
for (int side1 : divisors(k)) {
const int side2 = k / side1;
answer += (ll)std::max(0,n-side1) * std::max(0, m-side2) % mod;
if (answer >= mod) answer -= mod;
}
std::cout << answer;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdHlwZWRlZiBsb25nIGxvbmcgbGw7CgpzdGQ6OnZlY3RvcjxpbnQ+IGRpdmlzb3JzKGludCBrKSB7CiAgICBzdGQ6OnZlY3RvcjxpbnQ+IGFuc3dlcnsxfSwgc3RhY2t7a307CiAgICBmb3IgKGludCBpID0gMjsgaSAqIGkgPD0gazsgKytpKSB7CiAgICAgICAgY29uc3QgaW50IGogPSBrIC8gaTsKICAgICAgICBpZiAoaiAqIGkgPT0gaykgewogICAgICAgICAgICBhbnN3ZXIucHVzaF9iYWNrKGkpOwogICAgICAgICAgICBzdGFjay5wdXNoX2JhY2soaik7CiAgICAgICAgfQogICAgfQogICAgd2hpbGUgKHN0YWNrLmJhY2soKSA9PSBhbnN3ZXIuYmFjaygpKSBzdGFjay5wb3BfYmFjaygpOwogICAgd2hpbGUgKCFzdGFjay5lbXB0eSgpKSB7IGFuc3dlci5wdXNoX2JhY2soc3RhY2suYmFjaygpKTsgc3RhY2sucG9wX2JhY2soKTsgfQogICAgcmV0dXJuIGFuc3dlcjsKfQoKY29uc3QgaW50IG1vZCA9IChpbnQpMWU5Kzc7CgppbnQgbWFpbigpIHsKICAgIGludCBuLCBtLC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