#P338. 【例58.1】 明明的随机数

【例58.1】 明明的随机数

Description

Ming wants to invite some classmates to participate in a questionnaire survey at school. To ensure the objectivity of the experiment, he first generated NN random integers between 11 and 10001000 (N100N≤100) using a computer. For any duplicate numbers, he keeps only one and removes the rest, with each unique number corresponding to a different student ID. He then sorts these numbers in ascending order and approaches the students in this order to conduct the survey. Please assist Ming in completing the tasks of "deduplication" and "sorting."

Input Format

The input consists of 22 lines. The first line contains a positive integer NN, representing the number of random numbers generated.
The second line contains NN positive integers separated by spaces, representing the generated random numbers.

Output Format

The output consists of 22 lines. The first line contains a positive integer MM, representing the number of unique random numbers.
The second line contains MM positive integers separated by spaces, representing the sorted unique random numbers in ascending order.

Sample

10
20 40 32 67 40 20 89 300 400 15
8
15 20 32 40 67 89 300 400