There are n people. Each person sees some of the other people. Each of them will be given a black or white hat. After that each person will simultaneously name a color. Everyone who doesn't guess the color on his hat will die. Horribly.
Is there a deterministic strategy which guarantees that at least one person will survive?
The first line contains two integers n and m (2≤n≤3⋅105,1≤m≤3⋅105), the number of people and the number of relations of seeing someone (see below), respectively.
m lines follow. i-th of them contains two integers a_i and b_i (0≤a_i,b_i< n,a_i=b_i) meaning that a_i-th person sees b_i-th person. For all i=j, a_i=a_j or b_i=b_j holds.
Print 1 if there exists such strategy and 0 otherwise.