#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n) - 1; i >= 0; i--) #define repe(i, l, r) for (int i = (l); i < (r); i++) #define reper(i, l, r) for (int i = (r) - 1; i >= (l); i--) #define repi(i, l, r) for (int i = (l); i <= (r); i++) #define repir(i, l, r) for (int i = (r); i >= (l); i--) #define range(a) a.begin(), a.end() void initio() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); } typedef pair Pii; #define FOR(i,n) for(int i = 0; i < (n); i++) #define sz(c) ((int)(c).size()) #define ten(x) ((int)1e##x) template T extgcd(T a, T b, T& x, T& y) { for (T u = y = 1, v = x = 0; a;) { T q = b / a; swap(x -= q * u, u); swap(y -= q * v, v); swap(b -= q * a, a); } return b; } template T mod_inv(T a, T m) { T x, y; extgcd(a, m, x, y); return (m + x % m) % m; } ll mod_pow(ll a, ll n, ll mod) { ll ret = 1; ll p = a % mod; while (n) { if (n & 1) ret = ret * p % mod; p = p * p % mod; n >>= 1; } return ret; } template class NTT { public: int get_mod() const { return mod; } void _ntt(vector& a, int sign) { const int n = sz(a); assert((n ^ (n&-n)) == 0); //n = 2^k const int g = 3; //g is primitive root of mod int h = (int)mod_pow(g, (mod - 1) / n, mod); // h^n = 1 if (sign == -1) h = (int)mod_inv(h, mod); //h = h^-1 % mod //bit reverse int i = 0; for (int j = 1; j < n - 1; ++j) { for (int k = n >> 1; k >(i ^= k); k >>= 1); if (j < i) swap(a[i], a[j]); } for (int m = 1; m < n; m *= 2) { const int m2 = 2 * m; const ll base = mod_pow(h, n / m2, mod); ll w = 1; FOR(x, m) { for (int s = x; s < n; s += m2) { ll u = a[s]; ll d = a[s + m] * w % mod; a[s] = u + d; if (a[s] >= mod) a[s] -= mod; a[s + m] = u - d; if (a[s + m] < 0) a[s + m] += mod; } w = w * base % mod; } } for (auto& x : a) if (x < 0) x += mod; } void ntt(vector& input) { _ntt(input, 1); } void intt(vector& input) { _ntt(input, -1); const int n_inv = mod_inv(sz(input), mod); for (auto& x : input) x = x * n_inv % mod; } // 畳み込み演算を行う vector convolution(const vector& a, const vector& b){ int ntt_size = 1; while (ntt_size < sz(a) + sz(b)) ntt_size *= 2; vector _a = a, _b = b; _a.resize(ntt_size); _b.resize(ntt_size); ntt(_a); ntt(_b); FOR(i, ntt_size){ (_a[i] *= _b[i]) %= mod; } intt(_a); return _a; } }; ll garner(vector mr, int mod){ mr.emplace_back(mod, 0); vector coffs(sz(mr), 1); vector constants(sz(mr), 0); FOR(i, sz(mr) - 1){ // coffs[i] * v + constants[i] == mr[i].second (mod mr[i].first) を解く ll v = (mr[i].second - constants[i]) * mod_inv(coffs[i], mr[i].first) % mr[i].first; if (v < 0) v += mr[i].first; for (int j = i + 1; j < sz(mr); j++) { (constants[j] += coffs[j] * v) %= mr[j].first; (coffs[j] *= mr[i].first) %= mr[j].first; } } return constants[sz(mr) - 1]; } typedef NTT<167772161, 3> NTT_1; typedef NTT<469762049, 3> NTT_2; typedef NTT<1224736769, 3> NTT_3; //任意のmodで畳み込み演算 O(n log n) vector int32mod_convolution(vector a, vector b,int mod){ for (auto& x : a) x %= mod; for (auto& x : b) x %= mod; NTT_1 ntt1; NTT_2 ntt2; NTT_3 ntt3; auto x = ntt1.convolution(a, b); auto y = ntt2.convolution(a, b); auto z = ntt3.convolution(a, b); vector ret(sz(x)); vector mr(3); FOR(i, sz(x)){ mr[0].first = ntt1.get_mod(), mr[0].second = (int)x[i]; mr[1].first = ntt2.get_mod(), mr[1].second = (int)y[i]; mr[2].first = ntt3.get_mod(), mr[2].second = (int)z[i]; ret[i] = garner(mr, mod); } return ret; } constexpr int MOD = 1000000007; class mint { int n; public: mint(int n_ = 0) : n(n_) {} explicit operator int() { return n; } friend mint operator-(mint a) { return -a.n + MOD * (a.n != 0); } friend mint operator+(mint a, mint b) { int x = a.n + b.n; return x - (x >= MOD) * MOD; } friend mint operator-(mint a, mint b) { int x = a.n - b.n; return x + (x < 0) * MOD; } friend mint operator*(mint a, mint b) { return (long long)a.n * b.n % MOD; } friend mint &operator+=(mint &a, mint b) { return a = a + b; } friend mint &operator-=(mint &a, mint b) { return a = a - b; } friend mint &operator*=(mint &a, mint b) { return a = a * b; } friend bool operator==(mint a, mint b) { return a.n == b.n; } friend bool operator!=(mint a, mint b) { return a.n != b.n; } friend istream &operator>>(istream &i, mint &a) { return i >> a.n; } friend ostream &operator<<(ostream &o, mint a) { return o << a.n; } }; vector F_{1, 1}, R_{1, 1}, I_{0, 1}; void check_fact(int n) { for (int i = I_.size(); i <= n; i++) { I_.push_back(I_[MOD % i] * (MOD - MOD / i)); F_.push_back(F_[i - 1] * i); R_.push_back(R_[i - 1] * I_[i]); } } mint I(int n) { check_fact(n); return n < 0 ? 0 : I_[n]; } mint F(int n) { check_fact(n); return n < 0 ? 0 : F_[n]; } mint R(int n) { check_fact(n); return n < 0 ? 0 : R_[n]; } mint C(int n, int r) { return F(n) * R(n - r) * R(r); } mint P(int n, int r) { return F(n) * R(n - r); } mint H(int n, int r) { return n == 0 ? (r == 0) : C(n + r - 1, r); } mint alt(int n) { return n % 2 == 0 ? 1 : MOD - 1; } int main() { int X, Y, Z; cin >> X >> Y >> Z; vector A(1 << 21); vector B(1 << 21); for (int i = 0; i < A.size(); i++) { A[i] = (int)(alt(i) * R(i)); B[i] = (int)(R(i) * F(i + X - 1) * F(i + Y - 1) * F(i + Z - 1) * R(i - 1) * R(i - 1) * R(i - 1)); } A = int32mod_convolution(A, B, MOD); mint ans = 0; rep(i, A.size() / 2) { ans += A[i] * F(i); } ans *= R(X) * R(Y) * R(Z); cout << ans << endl; /* { mint ans; for (int k = 0; k <= 8000; k++) { mint v; for (int i = 0; i <= k; i++) { int j = k - i; mint s = i % 2 == 0 ? 1 : MOD - 1; // ans += s * C(k, i) * H(k - i, X) * H(k - i, Y) * H(k - i, Z); mint tmp = s * R(i) * R(j); tmp *= F(j + X - 1) * R(j - 1); tmp *= F(j + Y - 1) * R(j - 1); tmp *= F(j + Z - 1) * R(j - 1); v += tmp; } ans += v * F(k); } ans *= R(X) * R(Y) * R(Z); cout << ans << endl; } */ }