Arbitrary circulation
Given a network G, each edge has a specified capacity c_i and a lower bound l_i for the flow through it. This means the flow f_i through each edge must satisfy the condition l_i ≤ f_i ≤ c_i.
A circulation in the network is defined as a flow where the total flow into any vertex equals the total flow out of it. This condition does not apply to the source and sink in a typical flow network, but for circulation, it applies to all vertices.
Your task is to find any circulation in the given network.
Input
The first line contains two integers (1 ≤ n ≤ 200, 0 ≤ m ≤ 400), where n is the number of vertices and m is the number of edges. The following m lines describe the edges in the format from_i, to_i, l_i, c_i. Here, from_i is the starting vertex, to_i is the ending vertex, l_i is the lower bound of the flow, and c_i is the upper bound (1 ≤ from_i, to_i ≤ n, 0 ≤ l_i ≤ c_i ≤ 10^5). All values are integers. The graph does not contain multiple edges between the same vertices or loops.
If there is an edge from vertex a to vertex b, there is no edge from b to a (i.e., no reverse edges are present).
Output
If no circulation exists, output NO. If a circulation is possible, output YES. Then, provide m lines, each containing the flow amount through the i-th edge in the circulation.