Given an undirected graph with only 5 vertices and e edges, you are asked to check if it’s a butterfly.
A butterfly graph is a graph that has five nodes, with one central node and four nodes connected to it. The central node has two nodes connected to it, and those two nodes are connected to each other, on one side. On the other side, it also has two nodes connected to the central one, and those two are connected to each other.
The first line of the input contains a single integer e (1 ≤ e ≤ 20).
The following e lines contain pairs of integers v1, v2 (1 ≤ v1, v2 ≤ 5) which means that the vertex v1 is connected to the vertex v2.
The program should print Yes if the graph is a butterfly, and No otherwise.