Problem C
Cubism

Cablo the famous sculptor has been hired to create an art installation in his home town. Cablo has $N$ aluminium squares with side lengths $1, 2, \dots , N$ lying around in his workshop. He will select a number of these squares to create the art piece. But in order for it to look good, the total area of squares he chooses must be a multiple of $1+2+3+\dots +N$.
You are given a positive integer $N$. Let $S$ be the set of integers $\{ 1, 2, 3, ..., N\} $. Your task is to find a subset $T$ of $S$ such that
\[ \sum _{t \in T}t^2 \]is a multiple of $1+2+3+\dots +N$.
Input
One integer $N$ ($4 \leq N \leq 10^9$). It can be proven that there always exists a solution if $N \geq 4$.
Output
Print $|T|$ integers $t_1, t_2, ... t_{|T|}$, on $|T|$ separate lines. This is the subset $T = \{ t_1, t_2, ..., t_{|T|} \} $ that you chose.
Sample Input 1 | Sample Output 1 |
---|---|
7 |
1 3 5 7 |