[ABC291E] 唯一排列判定 (Find Permutation)
Problem Statement
There is a length- sequence that is a permutation of .
While you do not know , you know that for pairs of integers .
Can be uniquely determined? If it is possible, find .
Input
The input is given from Standard Input in the following format:
$N$ $M$
$X_1$ $Y_1$
$\vdots$
$X_M$ $Y_M$
Output
If can be uniquely determined, print Yes in the first line. Then, print in the second line, separated by spaces.
If cannot be uniquely determined, just print No.
Example
3 2
3 1
2 3
Yes
3 1 2
Note
-
Constraints:
-
-
-
-
All values in the input are integers.
-
There is an consistent with the input.
-
Source: ABC291E