Sunny Graph
The Sun is a great heavenly body. The Sun is worshiped by various religions. Bob loves the Sun and loves any object that is similar to the Sun. He noticed that he can find the shape of the Sun in certain graphs. He calls such graphs "Sunny".
G=(V,E)
v∈V
G'=(V,E'),E'⊆E
We define the property "Sunny" mathematically. A graph with a vertex is called "Sunny" when there exists a subgraph that has the following two properties. (Be careful, the set of vertices must be the same.)
The connected component containing
v
is a cycle that consists of three or more vertices.
Every other component has exactly two vertices.
G'=(V,E')
The following picture is an example of a subgraph that has the above property.
G=(V,E)
1
Given a simple graph (In each edge, two end points are different. Every pair of vertices has one or no edge.) , write a program that decides whether the given graph with the vertex is "Sunny" or not.
Input
N
1 ≤ N ≤ 200
M
0 ≤ M ≤ 20,000
N
M
The first line contains two integers (odd, ) and (), separated by a single space. is the number of the vertices and is the number of the edges.
M
v_i
u_i
1 ≤ u_i, v_i ≤ N
u_i, v_i
u_i
v_i
u_i
v_i
(u_i, v_i)
The following lines describe the edges. Each line contains two integers and (). () indicates the edge that connects the two vertices and . and are different, and every pair are different.
Output
Print a line containing "Yes" when the graph is "Sunny". Otherwise, print "No".