Minimum and maximum connected component#11453

Minimum and maximum connected component

1 second
128 megabytes
Easy

An undirected graph is given. Find the size of its smallest and largest connected components.

Input

The first line contains two positive integers and (1 \leq n, m \leq 10000) — the number of vertices and edges of the graph. Each of the following lines contains two integers a_i and b_i (1 \leq a_i, b_i \leq n) — the description of an undirected edge.

Output

Print on one line the size of the smallest and largest connected components of the graph.

Examples

Example 1

Loading
Loading