block u to obstruct v is a grouping u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to hinder xi for each 1≤i≤k. The length of a way is the amount of lengths over all streets in the way. Two ways x0→x1→⋯→xk and y0→y1→⋯→yl are unique, if k≠l or xi≠yi for some 0≤i≤min{k,l}. Subsequent to moving to
Correct answer will be upvoted else downvoted. Computer science.
way from block u to obstruct v is a grouping u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to hinder xi for each 1≤i≤k. The length of a way is the amount of lengths over all streets in the way. Two ways x0→x1→⋯→xk and y0→y1→⋯→yl are unique, if k≠l or xi≠yi for some 0≤i≤min{k,l}.
Subsequent to moving to another city, Homer just recalls the two exceptional numbers L and R yet fails to remember the numbers n and m of squares and streets, separately, and how squares are associated by streets. Be that as it may, he accepts the number of squares ought to be no bigger than 32 (in light of the fact that the city was little).
As the dearest companion of Homer, if it's not too much trouble, let him know whether it is feasible to see as a (L,R)- constant city or not.
Input
The single line contains two integers L and R (1≤L≤R≤106).
Output
In case it is difficult to track down a (L,R)- consistent city inside 32 squares, print "NO" in a solitary line.
In any case, print "YES" in the principal line followed by a depiction of a (L,R)- constant city.
The subsequent line ought to contain two integers n (2≤n≤32) and m (1≤m≤n(n−1)2), where n means the number of squares and m indicates the number of streets.
Then, at that point, m lines follow. The I-th of the m lines ought to contain three integers simulated intelligence, bi (1≤ai<bi≤n) and ci (1≤ci≤106) demonstrating that there is a guided street from block
Step by step
Solved in 4 steps with 1 images