\begin{problem}{Destroying The Graph}{destroy.in}{destroy.out}{2 seconds}
                 
Alice and Bob play the following game. First, Alice draws some 
directed graph with $N$ vertices and $M$~arcs. 
After that Bob tries to destroy it.
In a move he may take any vertex of the graph and remove
either all arcs incoming into this vertex, or all arcs outgoing
from this vertex. 

Alice assigns two costs to each vertex:
$W_i^+$ and $W_i^-$. If Bob removes all arcs
incoming into the $i$-th vertex he pays $W_i^+$ dollars to
Alice, and if he removes outgoing arcs he pays $W_i^-$ dollars.

Find out what minimal sum Bob needs to remove all
arcs from the graph.

\InputFile

Input file describes the graph Alice has drawn.
The first line of the input file contains $N$ and $M$ 
(${1\le N \le 100}$, ${1 \le M \le 5000}$). 
The second line contains $N$ integer numbers specifying $W_i^+$.
The third line defines $W_i^-$ in a similar way. All costs are positive
and do not exceed $10^6$.
Each of the following $M$ lines contains two integers describing the
corresponding arc of the graph. Graph may contain loops and parallel arcs.

\OutputFile

On the first line of the output file print $W$ --- the
minimal sum Bob must have to remove all arcs from the graph.
On the second line print $K$~---~the number of
moves Bob needs to do it. After that
print $K$~lines that describe Bob's moves. Each line must 
first contain the number of the vertex and then `\texttt{+}'~or~`\texttt{-}' 
character, separated by one space. Character `\texttt{+}' means 
that Bob removes all arcs incoming into the specified vertex and
`\texttt{-}' that Bob removes all arcs outgoing from the specified
vertex.

\Example

\begin{example}[*]
\exmp{
3 6
1 2 3
4 2 1
1 2
1 1
3 2
1 2
3 1
2 3
}{
5
3
1 +
2 -
2 +
}%
\end{example}

\end{problem}
