public class Tennis
{
public static void main(String[] args)
{
Random random = new Random();
int aWin = 0, bWin = 0;
int n = (new Scanner(System.in)).nextInt(); // n为比赛场数
int m = (new Scanner(System.in)).nextInt(); // m为每场比赛回合数
for (int i = 0; i < n; i++)
{
int aScore = 0, bScore = 0, j = 0;
while (Math.abs(aScore - bScore) < 2 && j < m)
{
int game = Math.abs(random.nextInt() % 3);
if (game == 0 || game == 1)
aScore++;
else
bScore++;
if (aScore - bScore >= 2)
aWin++;
else if (bScore - aScore >= 2)
bWin++;
j++;
}
}
System.out.println((double) aWin / n * 100 + "%\n" +
(double) bWin / n * 100 + "%\n" + (100 - (double) (aWin + bWin) / n * 100) + "%\n");
}
}