Pavel is developing a game. To do that, he needs functions available in a third-party library too famous to be called. It is known that the functionifirst appeared in versionaiand existed until versionbi, and starting from the versionbi+ 1, it is absent in this library.
The library is not free and Pavel needs all the functions. Which minimal number of versions he need to purchase to be able to use all the functions?
Input
The first line contains a single integern(1 ≤n≤ 200000) — the number of the functions.
Each of the nextnlines contains two integersaiandbi(1 ≤ai≤bi≤ 109) — the interval of library versions where functioniwas available.
Output
In the first line output a single integerk— the minimal number of library versions need to be purchased to unlock all functions.
In the second line outputkdistinct integers — the numbers of versions need to be purchased.
If there are several possible answers, output any of them.
C. Third-Party Softwaretime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputPavel is developing a game. To do that, he nee