Codeforces Round 388 (Div. 2)
A
Bachgold Problem
Codeforces
800
原题
←B →
翻译中…

Bachgold problem is very easy to formulate. Given a positive integer $*n*$ represent it as a sum of maximum possible number of prime numbers. One can prove that such representation exists for any integer greater than $1$.

翻译中…

Recall that integer $*k*$ is called prime if it is greater than $1$ and has exactly two positive integer divisors — $1$ and $*k*$.

翻译中…

Input

翻译中…

The only line of the input contains a single integer $*n*$ ($2 ≤ *n* ≤ 100 000$).

翻译中…

Output

翻译中…

The first line of the output contains a single integer $*k*$ — maximum possible number of primes in representation.

翻译中…

The second line should contain $*k*$ primes with their sum equal to $*n*$. You can print them in any order. If there are several optimal solution, print any of them.

翻译中…

样例

Input #1
5
Output #1
2
2 3
InputCopy OutputCopy
Input #2
6
Output #2
3
2 2 2
InputCopy OutputCopy
题目信息
题号
749A
时间限制
1 s
内存限制
256 MB
标签
贪心
模拟
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。