Utility Pipes

There are two kinds of agricultural farms in the area - bigger farms, called hub farms, and smaller farms, called subject farms.
Some pairs of farms are connected by roads and each subject farm is accessible from at least one hub farm by a sequence of one or more roads.
A network of utility pipes is going to be built in the area. All hub farms are already connected to the state backbone utility grid, and none of the subject farms is connected to it.
The proposed network will connect each subject farm to exactly one hub farm by a sequence of one or more pipes. Each pipe will connect two farms and it will be laid by the road connecting the farms, thus, its length will be the same as the length of the road.
To keep the network scheme simple, it was decided that each subject farm will be connected to its closest hub farm. The distance between two farms is always equal to the minimum total length of roads that have to be traversed when traveling from one farm to the other one. All roads are two-way roads.
It was soon pointed out by the oponents of the project there there may be some subject farms for which there exist two or more closest hub farms. Project managers therefore decided to call such farms undecided farms and exclude them from the project altogether, if they will be revealed in the area. A separate project regarding their connection to the network would be proposed later.

An obvious demand of the management and the farmers is to lay pipes in optimal way, that is, to minimize their total length.
     


Image 1. A scheme of farms and roads in the area. Small circles represent farms, lines represent roads. Hub farms are drawn in black, numbers at the roads represent their length. Roads with pipes are highlighted in blue. The choice of roads with pipes is optimal, the total length of pipes is 42. There are 4 undecided farms, with background highlighted in light blue. The scheme illustrates Example 1 below.

The task

You are given a list of lengths of all roads in the area. Also, you are given a list of all hub farms in the area. Find the minimum total length of all pipes in the project and the number of undecided farms.


Input

The first line of input contains two integers F and R, number of farms and the number of roads. Farms are labeled by integers 0, 1, ..., F−1.
Next, there are R lines, each specifies one road. There are three integers on a line specifying a road, the first two are the labels of farms connected by the road and the third one is the length of the road.
Next, there is a line with single integer H, the number of hub farms. The next line contains H integers, the list of labels of all hub farms.
It holds, 2 ≤ F ≤ 104, 1 ≤ R ≤ 106, 1 ≤ HF. All road lengths are positive integers less than 1000.
All adjacent input values on any line are separated by a space.

Output

Ouput consists of one text line with two integers separated by space, representing the minimum pipes network length and the number of undecided farms.

         

Example 1

Input
20 31
0 1 4
0 5 2
1 2 9
1 6 5
2 3 6
2 7 2
3 4 2
3 8 7
4 9 5
5 6 7
5 10 1
6 7 8
6 11 3
7 8 9
7 12 5
8 9 3
8 13 8
9 14 2
10 11 4
10 15 6
11 12 3
11 16 5
12 13 4
12 17 4
13 14 3
13 18 2
14 19 5
15 16 2
16 17 6
17 18 8
18 19 2
4
3 8 15 17
Output
42 4









    Image 2. A scheme of farms, roads and optimal choice of roads with pipes in Example 1. Features of the scheme are explained in the description of Image 1.
         

Example 2

Input
13 16
0 1 1
0 5 1
0 3 1
1 2 1
2 7 1
2 4 1
3 6 1
4 6 1
5 10 1
6 8 1
6 9 1
7 12 1
8 10 1
9 12 1
10 11 1
11 12 1
4
0 2 12 10
Output
4 5






    Image 3. A scheme of farms, roads and optimal choice of roads with pipes in Example 2. Features of the scheme are explained in the description of Image 1.
         

Example 3

Input
8 11
0 1 4
1 2 4
2 3 2
3 4 7
4 7 7
7 6 2
6 5 4
5 0 4
1 5 1
2 6 1
3 7 1
2
0 4
Output
18 0







    Image 4. A scheme of farms, roads and optimal choice of roads with pipes in Example 3. Note there are no undecided farms in Example 3. Features of the scheme are explained in the description of Image 1.

Public data

The public data set is intended for easier debugging and approximate program correctness checking. The public data set is stored also in the upload system and each time a student submits a solution it is run on the public dataset and the program output to stdout and stderr is available to him/her.
Link to public data set