Denis also decided to start manufacturing and selling spinners, but he believes that a spinner can only have three or four blades. It has exactly M blades that it can attach to bases, and an unlimited supply of bases. He wants to make some 3-blade spinners and some 4-blade spinners so that all M blades are used. Decide how many spinners of each kind it should produce.
The program receives as input one positive integer M, not exceeding 2×109
, – the number of blades that Denis has.
The program should output two integers – the number of spinners with 3 blades and the number of spinners with 4 blades that Denis must produce. If the task has
several solutions, you need to display any of them. If Denis cannot use exactly M blades to produce spinners, the program should output two numbers 0.
Enter |
Output |
Note |
10 |
2
1 |
10=3.times. 2 + 4 x 1 |
1 |
0
0 |
It is not possible to produce spinners in such a way that
the total number of blades was 1.
|