100 #ABC177D. [ABC177D] Friends

[ABC177D] Friends

Score : 400400 points

Problem Statement

There are NN persons called Person 11 through Person NN.

You are given MM facts that "Person AiA_i and Person BiB_i are friends." The same fact may be given multiple times.

If XX and YY are friends, and YY and ZZ are friends, then XX and ZZ are also friends. There is no friendship that cannot be derived from the MM given facts.

Takahashi the evil wants to divide the NN persons into some number of groups so that every person has no friend in his/her group.

At least how many groups does he need to make?

Constraints

  • 2N2×1052 \leq N \leq 2\times 10^5
  • 0M2×1050 \leq M \leq 2\times 10^5
  • 1Ai,BiN1\leq A_i,B_i\leq N
  • AiBiA_i \neq B_i

Input

Input is given from Standard Input in the following format:

NN MM

A1A_1 B1B_1

\vdots

AMA_M BMB_M

Output

Print the answer.

5 3
1 2
3 4
5 1
3

Dividing them into three groups such as {1,3}\{1,3\}, {2,4}\{2,4\}, and {5}\{5\} achieves the goal.

4 10
1 2
2 1
1 2
2 1
1 2
1 3
1 4
2 3
2 4
3 4
4
10 4
3 1
4 1
5 9
2 6
3