# Playing On A Directed Graph YouKnowWho Contest Based on SUST Int...
Limits 1s, 512 MB

You are given a directed graph consisting of $n$ vertices and $m$ edges (each edge is directed, so it can be traversed in only one direction). You need to assign a value $P_i$ to each vertex $i$ from 1 to $n$ so that for each edge $u→v$ having weight $w$, $P_v - P_u ≤ w$ is satisfied.

## Input

The first line contains two integers $n$ and $m$ ($2 ≤ n ≤ 500, 1 ≤ m ≤ min(n(n - 1), 100000)$) — the number of vertices and the number of edges, respectively.

Then $m$ lines follow. Each line contains three integers $u$ and $v$ and $w$ denoting a directed edge going from vertex $u$ to vertex $v$ with weight $w$ ($1 ≤ u, v ≤ n, u ≠ v, -10^5 ≤ w ≤ 10^5$). Each ordered pair $(u, v)$ is listed at most once (there is at most one directed edge from $u$ to $v$).

## Output

If there exists any solution print "YES"(without quotes) on the first line. Then on the next line output $n$ integers where $i^{th}$ integer is the value of $P_i$ ($-10^9 ≤ P_i ≤ 10^9$) i.e. the value assigned to each vertex $i$ for each $i$ from 1 to $n$. If there are multiple ways to assign values, output any.

If there is no way to assign values to each vertex such that the above conditions are satisfied just print "NO"(without quotes) ending with a new line.

Note that on any line you can't print any trailing space.

## Sample

InputOutput
4 3
1 2 10
2 3 5
4 2 1

YES
0 0 0 0  uDebug

### Submit 