Cycles in the graph#2022

Cycles in the graph

1 second
128 megabytes
Medium

Given an undirected graph with vertices and edges, with no loops or multiple edges. Determine whether the graph contains a cycle, and if so, find the vertex with the smallest number that belongs to at least one of the cycles.

Input

The first line contains two integers and (1 \leq n \leq 10^5, 0 \leq k \leq 10^5), representing the number of vertices and edges in the graph. Then follow lines, each containing two distinct integers and (1 \leq a, b \leq n), indicating that there is an edge between vertices and . Each unordered pair appears at most once.

Output

If the graph contains no cycles, print a single word No. Otherwise, print Yes on the first line, and on the next line, print the smallest number of any vertex belonging to at least one cycle.

Examples

Example 1

Loading
Loading