n, m = map(int, input().split()) assert 1 <= n <= 10 ** 5 assert 0 <= m <= 10 ** 5 s = set() for _ in range(m): tmp = tuple(sorted(list(map(int, input().split())))) assert tmp not in s s.add(tmp)