Change of Scenery

No attempts yetTime limit3sMemory limit256 MB

Problem

You drive to work along the same streets every day because that route is the shortest one. It wastes no time, but the same buildings and the same junctions every morning have become dull, so you want a different route. You are not willing to spend more time, so the new route has to be exactly as long as the old one.

Junctions are numbered from 1 to NN. Your daily route starts at junction 1 and ends at junction NN. Decide whether another route of the same length exists that differs from the daily route in at least one street.

Two junctions can be joined by more than one street. Taking a different street counts as a different route even when both streets have the same length.

Input

The first line contains the number of junctions NN, the number of streets MM, and the number of junctions you pass every day KK. (1KN100001 \le K \le N \le 10000, 0M10000000 \le M \le 1000000)

The second line contains KK integers, the indices of the junctions you pass every day, in the order you pass them. The first integer is always 1 and the last integer is always NN. The route along that sequence is a shortest path from junction 1 to junction NN.

Each of the next MM lines describes one street. The ii-th of those lines contains three integers aia_i, bib_i, cic_i, meaning a street of length cic_i between junction aia_i and junction bib_i. (1ai,biN1 \le a_i, b_i \le N, 1ci100001 \le c_i \le 10000) Every street is undirected.

Several streets can connect the same pair of junctions. Between two successive junctions aa and bb of your daily route, that route uses a street of minimal length between aa and bb.

Output

Print yes on one line if you can take another route without losing time, and no otherwise.