The twenty-one casks

A sheikh had to pay three men with a batch of 21 equal wine casks, seven of them being full, seven half-full, and seven empty. How could Beremiz do the distribution, in such a way that each man received the same number of casks and the same amount of wine?

Input

Input consists in several natural numbers nn, all between 2 and 10610^6.

Output

For every nn, print a line with “nn:”. Then, print in three lines any way to divide nn full casks, nn half-full casks and nn empty casks among three men, so that each one receives nn casks and the same total amount of wine. The ii-th line must contain, separated by spaces, the number of full casks, half-full casks and empty casks that correspond to the ii-th man. Follow the format of the samples exactly.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T10:12:37.708Z

© Jutge.org, 2006–2026.
https://jutge.org