@admin, @satyaki3794 please update the test cases as my solution CodeChef: Practical coding for everyone got accepted it should not be accepted for the cases I have mentioned in the code .
INPUT
4 3
1 2
2 3
3 1
OUTPUT
should be NO.
QUESTION CLEARLY STATES
The country can be represented by a network of unidirectional roads between the cities
A road network is said to be tourist-friendly if for every city in the country, if a tourist starts his journey there, there is a path she can take to visit each and every city of the nation and traverse each road exactly once before ending up at the city where she started.
thanks