\problemname{Ice Cream}
\illustration{.4}{factory}{\href{https://www.yokota.af.mil/News/Photos/igphoto/2002083858/mediaid/3167207/}{Public Domain, U.S. Air Force photo by Machiko Arita}}

\noindent
The Better Get Obese (BGO) ice cream factory is gearing up for the holiday season, and after several years with mediocre sales, they have decided to focus only on their most popular product, ice cream with flavour of chocolate and vanilla.

In order to make a perfect such ice cream, it is important that the mixing machine receives equal amounts of vanilla and chocolate ice cream.

There are two separate creaming machines in the factory which produce respectively chocolate and vanilla ice cream, and the resulting creamy goodness is stored in two separate tanks. From there, it can be transported to the mixing machine through pipes, however the dimension of a pipe gives an upper bound for how much ice cream can pass through it each minute. These pipes meet in welding points, where streams of ice cream go from one pipe to another. Streams can also merge or split into other streams at such points, if more than two pipes meet here. It is not important to keep the flavors separate during the transportation, since they will eventually be mixed anyways.

Given a map of the pipe system, can you decide how many liters of ice cream the factory can produce each minute?

%
% The BGO chocolate factory is gearing up for the holiday season, and after several years with mediocre sales, they have decided to focus only on their most popular product, cream eggs. The cream egg factory must get its supplies from the cocoa factory and the vanilla cream factory, for every truck of cream eggs, they need 1 truck of cocoa and 1 truck of vanilla cream. BGO factories knows that they will be able to sell every cream egg they produce, and so will produce as many as possible. The raw ingredients must be transported to the Chocolate factory from the cocoa and vanilla cream factories, respectively. Given the positions of the factories, and the capacity of the road in the road network (in trucks per day), can you figure out how many trucks of cream eggs the BGO Chocolate factory can produce?

\section*{Input}
The first line of input contains two integers $n$ ($3 \leq n \leq 200$) and $m$ ($2 \leq m \leq 1\,000$), respectively the number of welding points, and the number of pipes. The second line contains three distinct integers $f$, $c$ and $v$ ($1 \leq f, c, v \leq n$), the welding points where respectively the mixing machine, the chocolate tank and the vanilla tank is connected to the pipe system.

Finally follows $m$ lines, the $i^{\text{th}}$ of which contains three non-negative integers $u_i$, $v_i$ and $x_i$ ($1 \leq u_i, v_i \leq n$, $1 \leq x_i \leq 1\,000$). These indicate that there is a pipe between welding points $u_i$ and $v_i$ with a capacity for transporting $x_i$ liters of ice cream per minute. Note that several pipes can go in parallel between the same welding points.

\section*{Output}
A single integer, the maximum amount of ice cream the BGO factory can produce each minute (in liters).
