#GYM104770E. Accounting Chaos
Accounting Chaos
Description
There is chaos in the accounting department of a grand hotel: one of the guests, Sergey, has disappeared and cannot be reached, and his bill for the stay has not been paid!
The accountants of the grand hotel take their responsibilities very seriously, so a separate journal is created for each visitor, which has 2 columns: "service" and "cost". In the "service" column, all the amenities provided by the hotel are recorded every day: breakfast in bed, taxi, stationery, etc., including the cost of the room for each day. In the "cost" column, the cost of each service is written in the local currency. The cost of the same service, including the room, does not change during the guest's stay.
Unfortunately, due to the confusion caused by Sergey's disappearance, one of the hotel staff accidentally spilled ink on the first column of the journal. Based on the remaining information, it is known that Sergey stayed in the grand hotel for $n$ days, and the costs of $m$ services provided to him during these days are known.
Since Sergey is a very important guest, he had his own non-standard rate for the room, but no one remembers what it was. The accounting department now wants to know what could be the cost of Sergey's stay in the hotel per day.
The first line contains two integers $n$, $m$ $(1 \le n \le m \le 3 \cdot 10^5)$ — the number of days Sergey stayed in the hotel and the number of service records.
The second line contains $m$ integers $c_1, c_2, \ldots, c_m$ $(1 \le c_i \le 10^9$) — the costs of services for all the days.
In the first line, output a single integer $k$ — the number of possible options for the cost of the room per day. It is guaranteed that $k \neq 0$.
In the second line, output $k$ numbers - the possible options for the cost in any order.
Input
The first line contains two integers $n$, $m$ $(1 \le n \le m \le 3 \cdot 10^5)$ — the number of days Sergey stayed in the hotel and the number of service records.
The second line contains $m$ integers $c_1, c_2, \ldots, c_m$ $(1 \le c_i \le 10^9$) — the costs of services for all the days.
Output
In the first line, output a single integer $k$ — the number of possible options for the cost of the room per day. It is guaranteed that $k \neq 0$.
In the second line, output $k$ numbers - the possible options for the cost in any order.
2 10
1 3 6 5 3 2 4 5 3 2
3
3 5 2