Road Construction
There are n cities and initially no roads between them. However, every day a new road will be constructed, and there will be a total of m 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 n (1 ≤ n ≤ 10^5
) and m (1 ≤ n ≤ 2 * 10^5
): the number of cities and roads. The cities are numbered 1, 2, ..., n.
Then, there are m lines describing the new roads. Each line has two integers a and b (1 ≤ a, b ≤ n): a new road is constructed between cities a and b.
You may assume that every road will be constructed between two different cities.
Output
Print m lines: the required information after each day.