Minibus in the city moves according to the route from the bus stop number to the bus stop number . The driver stops at a station only if at least one of the passengers in the cabin wants to get out. At the same time, all the passengers waiting for the minibus at this stop get in (the number of seats is unlimited). As the bus starts moving from stop number , all passengers at it just get in the minibus.
Given the list of passengers, determine the list of stations where the bus stops. It is guaranteed that at least one passenger of the minibus waits at the bus stop number .
The first line contains two positive integers , (1 \le n \le 10^5, 1 \le m \le 10^9) — the number of passengers and bus stops.
Each of the next lines contains two positive integers l_i — the number of the bus stop where the -th passenger waits for the minibus, and r_i — the number of the bus stop where the -th passenger gets out (1 \le l_i < r_i \le m).
Print on the first line the number of bus stops where the minibus will stop. Then print lines — the numbers of these bus stops in increasing order.
Example 1