Prune
The drainage system is composed of m drainage ditches on a plane, represented as line segments connecting drainage nodes. These ditches only intersect at the drainage nodes, which are their endpoints. Each ditch has a specified capacity, indicating the maximum units of fluid that can flow through it per unit of time. There is a common drainage outlet at a specific drainage node t. Fluid can flow in either direction through a ditch, but only one direction at a time.
The ditches divide the plane into several regions, including working areas (the outer region is also considered a working area). Vasya is currently in one of these regions, which has the common drainage outlet on its boundary. However, due to technical constraints, he cannot use the outlet directly. He urgently needs to drain butter through the ditches to reach the drainage node t. To achieve this, Vasya plans to drain the butter into a specific node s. The butter is assumed to spread instantly, and no more units of butter can flow through a ditch than its capacity allows. The task is to determine the maximum number of units of butter Vasya can drain per unit of time.
Input
The first line of the input specifies the number of drainage nodes n, the number of drainage ditches m, the node Vasya plans to use s, and the drainage node with the common outlet t (1 ≤ n ≤ 50000, 1 ≤ m ≤ 3n, 1 ≤ s, t ≤ n, s ≠ t). The next n lines provide the coordinates of the drainage nodes x_i y_i, which are integers not exceeding 10^9 in absolute value. No two drainage nodes share the same location. The following m lines describe the drainage ditches between nodes in the format u_j v_j w_j (1 ≤ u_j, v_j ≤ n, u_j ≠ v_j, 1 ≤ w_j ≤ 10^6), indicating a ditch between nodes u_j and v_j with a capacity w_j. It is guaranteed that ditches do not intersect at internal points, and that nodes s and t are accessible from the drainage area where Vasya is located, under normal drainage conditions. There is at most one ditch between any two nodes.
Output
Output the maximum amount of butter that Vasya can drain per unit of time.