#P1104A. Splitting into digits

    ID: 4796 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 3 Uploaded By: Tags>constructive algorithmsimplementationmath*800

Splitting into digits

Description

Vasya has his favourite number nn. He wants to split it to some non-zero digits. It means, that he wants to choose some digits d1,d2,,dkd_1, d_2, \ldots, d_k, such that 1di91 \leq d_i \leq 9 for all ii and d1+d2++dk=nd_1 + d_2 + \ldots + d_k = n.

Vasya likes beauty in everything, so he wants to find any solution with the minimal possible number of different digits among d1,d2,,dkd_1, d_2, \ldots, d_k. Help him!

The first line contains a single integer nn — the number that Vasya wants to split (1n10001 \leq n \leq 1000).

In the first line print one integer kk — the number of digits in the partition. Note that kk must satisfy the inequality 1kn1 \leq k \leq n. In the next line print kk digits d1,d2,,dkd_1, d_2, \ldots, d_k separated by spaces. All digits must satisfy the inequalities 1di91 \leq d_i \leq 9.

You should find a partition of nn in which the number of different digits among d1,d2,,dkd_1, d_2, \ldots, d_k will be minimal possible among all partitions of nn into non-zero digits. Among such partitions, it is allowed to find any. It is guaranteed that there exists at least one partition of the number nn into digits.

Input

The first line contains a single integer nn — the number that Vasya wants to split (1n10001 \leq n \leq 1000).

Output

In the first line print one integer kk — the number of digits in the partition. Note that kk must satisfy the inequality 1kn1 \leq k \leq n. In the next line print kk digits d1,d2,,dkd_1, d_2, \ldots, d_k separated by spaces. All digits must satisfy the inequalities 1di91 \leq d_i \leq 9.

You should find a partition of nn in which the number of different digits among d1,d2,,dkd_1, d_2, \ldots, d_k will be minimal possible among all partitions of nn into non-zero digits. Among such partitions, it is allowed to find any. It is guaranteed that there exists at least one partition of the number nn into digits.

Sample Input 1

1

Sample Output 1

1
1

Sample Input 2

4

Sample Output 2

2
2 2

Sample Input 3

27

Sample Output 3

3
9 9 9

Note

In the first test, the number 11 can be divided into 11 digit equal to 11.

In the second test, there are 33 partitions of the number 44 into digits in which the number of different digits is 11. This partitions are [1,1,1,1][1, 1, 1, 1], [2,2][2, 2] and [4][4]. Any of these partitions can be found. And, for example, dividing the number 44 to the digits [1,1,2][1, 1, 2] isn't an answer, because it has 22 different digits, that isn't the minimum possible number.