Time limit per test: 2 seconds Memory limit: 64 megabytes
input: standard output: standard
The ancient race of has built cities connected with two-way roads. They believed in magic of an even number and built the roads in such a way that each city had exactly roads going from it.
The
Hollars decided to decorate some roads because of their religious
holiday. Because they also believe in magic of an even number 2, each
city must have exactly 2 decorated roads going from it.
You have to find the roads needing to be decorated.
Input
The first line of the input contains integers and (). Each of the next
lines contains description of one road, being the numbers of the cities
connected by this road. The cities are numbered starting from 1. There
is no road from a city to itself; each pair of cities is connected by
at most one road.
Output
If it is
impossible to decorate the roads, the only line of the output must
contain 'NO' (without quotes). Otherwise the first line of the output
must contain 'YES' (without quotes); the rest of the output must
contain
lines, each containing one number of a road to be decorated. The roads
are numbered starting from 1 in the same order as they appear in the
input.