The Bad Luck Island is inhabited by three kinds of species: *r* rocks, *s* scissors and *p* papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, then one individual kills the other one: a rock kills scissors, scissors kill paper, and paper kills a rock. Your task is to determine for each species what is the probability that this species will be the only one to inhabit this island after a long enough period of time.
The single line contains three integers *r*, *s* and *p* (1 ≤ *r*, *s*, *p* ≤ 100) — the original number of individuals in the species of rock, scissors and paper, respectively.
#include <bits/stdc++.h>

using namespace std;
const int N = 101;
long double dp[N][N][N];
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
    int a, b, c;
    cin >> a >> b >> c;
    dp[a][b][c] = 1;
    for (int a1 = a; a1 >= 0; a1--)//камни
    {
        for (int b1 = b; b1 >= 0; b1--)//ножницы
        {
            for (int c1 = c; c1 >= 0; c1--)//бумага
            {
                if (a1 > 0 && b1 > 0)
                {
                    dp[a1][b1 - 1][c1] += double (a1 * b1) * dp[a1][b1][c1] / double (a1 * b1 + b1 * c1 + a1 * c1);
                }
                if (c1 > 0 && b1 > 0)
                {
                    dp[a1][b1][c1 - 1] += double (b1 * c1) * dp[a1][b1][c1] / double (a1 * b1 + b1 * c1 + a1 * c1);
                }
                if (a1 > 0 && c1 > 0)
                {
                    dp[a1 - 1][b1][c1] += double (a1 * c1) * dp[a1][b1][c1] / double (a1 * b1 + b1 * c1 + a1 * c1);
                }
            }
        }
    }
    long double ans1 = 0, ans2 = 0, ans3 = 0;
    for (int i = 1; i <= a; i++) ans1 += dp[i][0][0];
    for (int i = 1; i <= b; i++) ans2 += dp[0][i][0];
    for (int i = 1; i <= c; i++) ans3 += dp[0][0][i];
    cout << ans1 << ' ' << ans2 << ' ' << ans3 << endl;
    return 0;
}
