#P6485. [COCI 2010/2011 #4] PROSJEK

[COCI 2010/2011 #4] PROSJEK

Description

You have 55 kinds of numbers: 1,2,3,4,51,2,3,4,5.

You need to choose as few numbers as possible so that the average of their sum is PP.

Note that each of these 55 kinds of numbers can be used any number of times.

Input Format

Input one real number PP in a single line.

PP is a decimal with 191\sim 9 digits after the decimal point.

Output Format

Output five numbers in one line, representing how many times 1,2,3,4,51,2,3,4,5 are used.

If there are multiple optimal solutions, output any one of them. This problem uses SPJ.

5.0
0 0 0 0 1
4.5
0 0 0 1 1
3.20
0 0 4 1 0

Hint

Constraints

For 100%100\% of the testdata, it is guaranteed that 1P51\le P\le 5.

Notes

This problem is translated from COCI2010-2011 CONTEST #4 T4 PROSJEK

Translated by ChatGPT 5