Duff is one if the heads of Mafia in her country, Andarz Gu. Andarz Gu has *n* cities (numbered from 1 to *n*) connected by *m* bidirectional roads (numbered by 1 to *m*).

Each road has a destructing time, and a color. *i*-th road connects cities *v*<sub class="lower-index">*i*</sub> and *u*<sub class="lower-index">*i*</sub> and its color is *c*<sub class="lower-index">*i*</sub> and its destructing time is *t*<sub class="lower-index">*i*</sub>.

Mafia wants to destruct a matching in Andarz Gu. A matching is a subset of roads such that no two roads in this subset has common endpoint. They can destruct these roads in parallel, i. e. the total destruction time is a maximum over destruction times of all selected roads.

They want two conditions to be satisfied:
 1.  The remaining roads form a proper coloring. 1.  Destructing time of this matching is minimized. 
The remaining roads after destructing this matching form a proper coloring if and only if no two roads of the same color have same endpoint, or, in the other words, edges of each color should form a matching.

There is no programmer in Mafia. That's why Duff asked for your help. Please help her and determine which matching to destruct in order to satisfied those conditions (or state that this is not possible).
The first line of input contains two integers *n* and *m* (2 ≤ *n* ≤ 5 × 10<sup class="upper-index">4</sup> and 1 ≤ *m* ≤ 5 × 10<sup class="upper-index">4</sup>), number of cities and number of roads in the country.

The next *m* lines contain the the roads. *i* - *th* of them contains four integers *v*<sub class="lower-index">*i*</sub>, *u*<sub class="lower-index">*i*</sub>, *c*<sub class="lower-index">*i*</sub> and *t*<sub class="lower-index">*i*</sub> (1 ≤ *v*<sub class="lower-index">*i*</sub>, *u*<sub class="lower-index">*i*</sub> ≤ *n*, *v*<sub class="lower-index">*i*</sub> ≠ *u*<sub class="lower-index">*i*</sub> and 1 ≤ *c*<sub class="lower-index">*i*</sub>, *t*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup> for each 1 ≤ *i* ≤ *m*).
# LUOGU_RID: 99480133
print("No")