#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll A, B, C, N; cin >> A >> B >> C >> N; map, array> memo; auto dfs = [&](auto&& self, ll x, ll y, ll z, ll cnt) -> array { array key = {x, y, z, cnt}; if (memo.count(key)) return memo[key]; if (cnt == 0) { return memo[key] = {0.0, 0.0, 0.0}; } ll t = x + y + z; double pa = 0.0, pb = 0.0, pc = 0.0; if (x >= 2) pa = double(x) * (x - 1) / t / (t - 1); if (y >= 2) pb = double(y) * (y - 1) / t / (t - 1); if (z >= 2) pc = double(z) * (z - 1) / t / (t - 1); double p_stay = 1.0 - pa - pb - pc; array res = {0.0, 0.0, 0.0}; // 違う色を引いた場合:状態は変わらない { auto nxt = self(self, x, y, z, cnt - 1); for (int i = 0; i < 3; i++) { res[i] += p_stay * nxt[i]; } } // 白を2枚引いた場合 if (x >= 2) { auto nxt = self(self, x - 1, y, z, cnt - 1); res[0] += pa * (1.0 + nxt[0]); res[1] += pa * nxt[1]; res[2] += pa * nxt[2]; } // 黒を2枚引いた場合 if (y >= 2) { auto nxt = self(self, x, y - 1, z, cnt - 1); res[0] += pb * nxt[0]; res[1] += pb * (1.0 + nxt[1]); res[2] += pb * nxt[2]; } // 茶を2枚引いた場合 if (z >= 2) { auto nxt = self(self, x, y, z - 1, cnt - 1); res[0] += pc * nxt[0]; res[1] += pc * nxt[1]; res[2] += pc * (1.0 + nxt[2]); } return memo[key] = res; }; auto ans = dfs(dfs, A, B, C, N); cout << fixed << setprecision(10); cout << ans[0] << " " << ans[1] << " " << ans[2] << '\n'; }