The Five (2013)


  • Memory Limit: 256MB
  • Time Limit: 1sec

Sina decided to challenge Nima! He gave him a real number AA and a bag full of cards with exactly one number 151-5 written on each card. There is an unlimited quantity of each type of card.

Nima's task is to pick the minimum number of cards in a way that the average of the numbers written on them equals exactly AA.

Input🔗

First and only line of input contains real number AA.

AA will have between 11 and 99 decimal places, inclusive . 1A51 \le A \le 5

Output🔗

First and only line of output should contain 5 nonnegative integers - numbers of the ones, twos, threes, fours and fives used, respectively. If there are multiple solutions, output any one of them.

Sample Input 1🔗

5.0
Plain text

Sample Output 1🔗

0 0 0 0 1
Plain text

Sample Input 2🔗

4.5
Plain text

Sample Output 2🔗

0 0 0 1 1
Plain text

Sample Input 3🔗

3.20
Plain text

Sample Output 3🔗

0 0 4 1 0
Plain text