
Alleys in the city of Bytemore connect street corners. When a robbery happens, one patrolling police officer chases the robber alone. The police drew an exact map of the city so that a computer can plan the chase.
One officer chasing one robber works as follows. The corners are numbered 1 through n, and one alley joins two different corners.
If the robber picks the corner the officer patrols, he is caught on the spot without any move.
The move count includes the moves of the officer and the moves of the robber, and a wait by the officer counts as one move. The officer's first goal is to catch the robber, and when he can, he makes the move count as small as possible. The robber's first goal is to escape, and when he cannot escape at all, he makes the move count as large as possible. Both play their best.
Given the map of the city, decide whether the officer can always catch the robber.
The first line has the number of corners n and the number of alleys m, separated by one space. Each of the next m lines has the numbers a and b of the two corners that one alley joins.
If at least one starting corner lets the officer catch the robber whatever corner the robber picks, print YES on the first line, then print the number of that starting corner and the move count on the second line, separated by one space. The move count of a starting corner c is the number of moves the catch takes when the robber picks the corner he holds out on the longest. Print the starting corner whose move count is smallest, and among those the one with the smallest number.
If no such starting corner exists, print only NO on the first line.