You are given a simple connected undirected graph with N vertices and M edges. The i-th edge connects the vertices a_i and b_i.
Initially, the edges are not colored. Takahashikun wants to color the i-th edge with the color c_i.
He can color the edges in the following way:
Determine if he can color all edges with correct colors.
N M
a_1 b_1 c_1
a_2 b_2 c_2
⋮
a_M b_M c_M
Print "Yes", if Takahashikun can color all edges with correct colors or "No" otherwise.
r' (red) or a 'b' (blue).