using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var p = NList; var (a, b, c, n) = (p[0], p[1], p[2], p[3]); var dp = new double[132652]; dp[Key(a, b, c)] = 1; for (var i = 0; i < n; ++i) { var ndp = new double[132652]; for (var j = 0; j < dp.Length; ++j) { if (dp[j] == 0) continue; var (x, y, z) = FromKey(j); var all = (x + y + z) * (x + y + z - 1) / 2; var prob = dp[j]; if (x > 1) { var px = dp[j] * x * (x - 1) / 2 / all; prob -= px; ndp[Key(x - 1, y, z)] += px; } if (y > 1) { var py = dp[j] * y * (y - 1) / 2 / all; prob -= py; ndp[Key(x, y - 1, z)] += py; } if (z > 1) { var pz = dp[j] * z * (z - 1) / 2 / all; prob -= pz; ndp[Key(x, y, z - 1)] += pz; } ndp[j] += prob; } dp = ndp; } var ax = 0.0; var ay = 0.0; var az = 0.0; for (var i = 0; i < dp.Length; ++i) { var (x, y, z) = FromKey(i); ax += (a - x) * dp[i]; ay += (b - y) * dp[i]; az += (c - z) * dp[i]; } WriteLine($"{ax} {ay} {az}"); } static int Key(int a, int b, int c) { return a * 2601 + b * 51 + c; } static (int a, int b, int c) FromKey(int key) { return (key / 2601, key / 51 % 51, key % 51); } }