Simple enough, you’ll be given a simple undirected graph with n vertexes and m edges, try to divide this graph fits the following requirements: All edges are divided into several groups; only two edges exist in every group, and this two edges have common vertex. Your task is to figure out if such a partition exists.
输入解释
There are multiple test cases, for each test case: The first line contains two integers n (0<n<=1000) and m represent the number of vertexes and edges. The following m lines, each line contains two integers represent two endpoints of an edge. The vertexes are numbered from 1 to n. The input terminated when n=m=0.
输出解释
For each test case, output one line, if such a partition exists, print “Yes”, otherwise, print “No”.