Codeforces Round 184 (Div. 2)
A
Strange Addition
Codeforces
1600
原题
←B →
翻译中…

Unfortunately, Vasya can only sum pairs of integers ($*a*$, $*b*$), such that for any decimal place at least one number has digit $0$ in this place. For example, Vasya can sum numbers $505$ and $50$, but he cannot sum $1$ and $4$.

翻译中…

Vasya has a set of $*k*$ distinct non-negative integers $*d*_{1}, *d*_{2}, ..., *d*_{*k*}$.

翻译中…

Vasya wants to choose some integers from this set so that he could sum any two chosen numbers. What maximal number of integers can he choose in the required manner?

翻译中…

Input

翻译中…

The first input line contains integer $*k*$ $(1 ≤ *k* ≤ 100)$ — the number of integers.

翻译中…

The second line contains $*k*$ distinct space-separated integers $*d*_{1}, *d*_{2}, ..., *d*_{*k*}$ $(0 ≤ *d*_{*i*} ≤ 100)$.

翻译中…

Output

翻译中…

In the first line print a single integer $*n*$ the maximum number of the chosen integers. In the second line print $*n*$ distinct non-negative integers — the required integers.

翻译中…

If there are multiple solutions, print any of them. You can print the numbers in any order.

翻译中…

样例

Input #1
4
100 10 1 0
Output #1
4
0 1 10 100
InputCopy OutputCopy
Input #2
3
2 70 3
Output #2
2
2 70
InputCopy OutputCopy
题目信息
题号
305A
时间限制
2 s
内存限制
256 MB
标签
暴力
构造
模拟

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