XHXMMMl3JIXaWg#'^)`

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Statement

Vasya has his favourite number n n . He wants to split it to some non-zero digits. It means, that he wants to choose some digits d1,d2,,dk d_1, d_2, \ldots, d_k , such that 1di9 1 \leq d_i \leq 9 for all i i and d1+d2++dk=n d_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,,dk d_1, d_2, \ldots, d_k . Help him!

Format

Input

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

Output

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

You should find a partition of n n in which the number of different digits among d1,d2,,dk d_1, d_2, \ldots, d_k will be minimal possible among all partitions of n n 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 n n into digits.

Sample

1
1
1
4
2
2 2
27
3
9 9 9

ShanghaiTech ACM 炸鱼杯

未参加
状态
已结束
规则
OI
题目
46
开始于
2024-12-10 23:00
结束于
2024-12-15 13:00
持续时间
110 小时
主持人
参赛人数
112