eolymp
bolt
Try our new interface for solving problems
Problems

Stained-glass window

Stained-glass window

Time limit 1 second
Memory limit 64 MiB

In the house of an Owl there is one unusual circular window with radius R, which consists of 12 pieces of glass, all of these pieces can be classified into 3 groups by shape. Each piece of glass of one form denoted by a letter, so, we have 4 pieces with notations A, 4 pieces with symbols B and 4C.

One day, a strong wind broke some of the elements window and in front of the wise Owl a question stood, what the area is damaged in each separated group.

Input data

In one line is written integer R (0 < R10^6), then after a space described each group of defeated elements in the format A:X B:Y C:Z, where X, Y, Z are integers (0X, Y, Z4).

Output data

To put out the area of each group using space with an accuracy of 3 decimal places.

Examples

Input example #1
10 A:1 B:2 C:3
Output example #1
14.270 100.000 42.810
Author Ruban Nikolaj