Odd and even

Let us consider a country with N towns. A system of roads formed from direct connections between towns is given; all these direct connections are considered to have the length equal to 1. This system is called even-odd if there are two towns linked by a road of even length, as well as by a road of odd length.

a) Find out if the system of roads is even-odd or not.

b) If the answer for a) is negative, find one of the subsets X of towns which has a maximal number of elements and satisfies the following condition: for any two towns in X, if there is a path linking them, then its length is even.

The name of the input file is introduced from the keyboard. Its first line contains the value of N; the following lines contain pairs I,J with the meaning that the towns I and J are directly linked.

The value of N is at most 300. It can be assumed that every town can be reached from every other town.

Display the output on the screen in an intelligible form.

Examples:

If the input file contains

5
1 2
2 3
3 4
4 5
5 1

If the input file contains:

4
1 2
3 1
1 4

a valid output is

YES

then a valid output is:

NO
X: 2 3 4