Find a cycle#2270

Find a cycle

1 second
128 megabytes
Very easy

You are given a directed unweighted graph. Determine whether it contains a cycle. If the graph contains a cycle, output any one such cycle.

Input

The first line contains two positive integers and (1 \le n \le 10^5, 1 \le m \le 10^5): the number of vertices and the number of edges in the graph, respectively. Each of the next lines contains two integers, describing an edge from the starting vertex to the ending vertex.

Output

If the graph does not contain any cycles, print NO. Otherwise, print YES, and then output the vertices contained in one cycle, in the order they are traversed. If there are multiple cycles, output any one of them.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading