Road Construction#11000

Road Construction

1 second
128 megabytes
Very easy

There are cities and initially no roads between them. However, every day a new road will be constructed, and there will be a total of roads.

A component is a group of cities where there is a route between any two cities using the roads. After each day, your task is to find the number of components and the size of the largest component.

Input

The first line has two integers ( ≤ ≤ 10^5) and ( ≤ ≤ 2 \cdot 10^5): the number of cities and roads. The cities are numbered , , ..., .

Then, there are lines describing the new roads. Each line has two integers and ( ≤ , ≤ ): a new road is constructed between cities and .

You may assume that every road will be constructed between two different cities.

Output

Print lines: the required information after each day.

Examples

Example 1

Loading
Loading