407386: GYM102780 J Something that resembles Waring's problem
Description
Waring's problem is a number-theoretic statement, according to which for every integer $$$n>1$$$ there exists a number $$$k=k(n)$$$ such that any natural number $$$N$$$ can be represented as: $$$$$$x_1^n + x_2^n + ... + x_k^n = N$$$$$$ with non-negative integers $$$x_1$$$, $$$x_2$$$, ..., $$$x_n$$$.
You are required to represent the number $$$x$$$ in the form of $$$a_1^3 + a_2^3 + ... + a_k^3 = x$$$, with integers $$$a_1$$$, ..., $$$a_k$$$ and $$$k \le 5$$$.
InputThe first line contains the number $$$x$$$ $$$(1 \le x \le 10^{100000})$$$.
OutputIf such a representation does not exist, type $$$-1$$$. Otherwise, in the first line, type the number $$$k$$$ — the number of numbers. In the second line, type $$$k$$$ integers $$$a_i$$$ $$$(|a_i| \le 10^{110000})$$$.
ExamplesInput5Output
5 1 1 1 1 1Input
17Output
3 1 2 2Note
In the first example: $$$1^3 + 1^3 + 1^3 + 1^3 + 1^3 = 5$$$.
In the second example: $$$1^3 + 2^3 + 2^3 = 17$$$.