def main():
global parent, rank
# parse input
N, M = map(int, input().split())
parent = [-1] * N
rank = [0] * N
for q in range(M):
a, b = map(int, input().split())
unite(a - 1, b - 1)
xs = list(find_root(x) for x in range(N))
# debug(": xs", xs)
# print(len(set(xs))) # WRONG!
from collections import Counter
print(max(Counter(xs).values()))
def solve(N, AS):
is_pairwise = True
maxAS = max(AS)
sieved = [False] * (maxAS + 10)
for p in range(2, maxAS + 1):
if sieved[p]:
continue
# p is prime
x = p + p
while x <= maxAS:
sieved[x] = True
x += p
sum_div = 0
for i, a in enumerate(AS):
dividable = 0
while a % p == 0:
a //= p
dividable = 1
AS[i] = a
sum_div += dividable
if sum_div >= 2:
is_pairwise = False
if sum_div == N:
return "not coprime"
if is_pairwise:
return "pairwise coprime"
return "setwise coprime"
def solve(N, AS):
maxAS = max(AS)
eratree = [0] * (maxAS + 10)
for p in range(2, maxAS + 1):
if eratree[p]:
continue
# p is prime
eratree[p] = p
x = p * p
while x <= maxAS:
if not eratree[x]:
eratree[x] = p
x += p
count = defaultdict(int)
for a in AS:
factors = []
while a > 1:
d = eratree[a]
factors.append(d)
a //= d
for f in set(factors):
count[f] += 1
if any(x == N for x in count.values()):
return "not coprime"
if any(x >= 2 for x in count.values()):
return "setwise coprime"
return "pairwise coprime"