Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/integer-tonna-kilogramm-gramm

Tonnes, kilograms and grams

Easy 1000 ms 64 MB 11%
Share

A load weighs $N$ grams. Express it in tonnes, kilograms and grams ($1$ tonne $= 1000$ kilograms, $1$ kilogram $= 1000$ grams): the kilograms must be less than $1000$ and the grams less than $1000$.

Grams split into tonnes, kilograms and grams

Input

One integer $N$.

Output

One line with three integers: tonnes $T$, kilograms $K$ and grams $G$.

Note

$0 \le N \le 10^{9}$

Examples

Input #1
2345678
Output #1
2 345 678
Input #2
999
Output #2
0 0 999

Sign in to submit a solution

Signing up is free and takes a minute.