#P290F. Greedy Petya
Greedy Petya
Description
Petya is an unexperienced programming contestant. Recently he has come across the following problem:
You are given a non-directed graph which consists of n nodes and m edges. Your task is to determine whether the graph contains a Hamiltonian path.
Petya wrote a quick bug-free code which he believes solves this problem. After that Petya decided to give this problem for April Fools Day contest. Unfortunately, Petya might have made a mistake, and it's quite possible that his algorithm is wrong. But this isn't a good excuse to leave the contest without submitting this problem, is it?
The first line contains two integers n, m (1 ≤ n ≤ 20; 0 ≤ m ≤ 400). Next m lines contain pairs of integers vi, ui (1 ≤ vi, ui ≤ n).
Follow the format of Petya's code output.
Input
The first line contains two integers n, m (1 ≤ n ≤ 20; 0 ≤ m ≤ 400). Next m lines contain pairs of integers vi, ui (1 ≤ vi, ui ≤ n).
Output
Follow the format of Petya's code output.
2 3<br>1 2<br>2 1<br>1 1<br>
3 0<br>
10 20<br>3 10<br>4 6<br>4 9<br>7 5<br>8 8<br>3 10<br>9 7<br>5 2<br>9 2<br>10 6<br>10 4<br>1 1<br>7 2<br>8 4<br>7 2<br>1 8<br>5 4<br>10 2<br>8 5<br>5 2<br>
Yes<br>
No<br>
No<br>