#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main() { int A, B, C, N; cin >> A >> B >> C >> N; double dp[A + 1][B + 1][C + 1]; memset(dp, 0, sizeof(dp)); dp[A][B][C] = 1.0; for (int i = 0; i < N; ++i) { double tmp[A + 1][B + 1][C + 1]; memset(tmp, 0, sizeof(tmp)); for (int a = 1; a <= A; ++a) { for (int b = 1; b <= B; ++b) { for (int c = 1; c <= C; ++c) { int S = a + b + c; double pa = a * (a - 1) * 1.0 / (S * (S - 1)); double pb = b * (b - 1) * 1.0 / (S * (S - 1)); double pc = c * (c - 1) * 1.0 / (S * (S - 1)); tmp[a - 1][b][c] += pa * dp[a][b][c]; tmp[a][b - 1][c] += pb * dp[a][b][c]; tmp[a][b][c - 1] += pc * dp[a][b][c]; tmp[a][b][c] += (1.0 - pa - pb - pc) * dp[a][b][c]; } } } memcpy(dp, tmp, sizeof(tmp)); } double ans[3] = {0.0, 0.0, 0.0}; for (int a = 1; a <= A; ++a) { for (int b = 1; b <= B; ++b) { for (int c = 1; c <= C; ++c) { int da = A - a; int db = B - b; int dc = C - c; ans[0] += da * dp[a][b][c]; ans[1] += db * dp[a][b][c]; ans[2] += dc * dp[a][b][c]; } } } cout << fixed << setprecision(10) << ans[0] << " " << ans[1] << " " << ans[2] << endl; return 0; }