import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author cteam94
*/
public class FN {
Map
<Integer, List
<Integer
>> map
= new HashMap
<Integer, List
<Integer
>>();
while((new FN()).readLine(br));
}
if (line == null) return false;
map
= new HashMap
<Integer, List
<Integer
>>();
String[] sp
= line.
split(" ");
for (int i = 1; i <= n1; i++) {
map.put(i, new ArrayList<Integer>());
}
for (int i = 0; i < n2; i++) {
List<Integer> l = map.get(u);
l.add(v);
l = map.get(v);
l.add(u);
}
// System.out.println(map);
for (Map.
Entry<Integer, List
<Integer
>> entry
: map.
entrySet()) { int c = 0;
List<Integer> list = entry.getValue();
if (isPow(v)) c++;
if (c >= 4) {
return true;
}
}
}
return true;
}
public boolean isPow(int x) {
if (map.get(x).size() == 1) return true;
return false;
}
}