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 N. Your daily route starts at junction 1 and ends at junction N. 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.
The first line contains the number of junctions N, the number of streets M, and the number of junctions you pass every day K. (1≤K≤N≤10000, 0≤M≤1000000)
The second line contains K 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 N. The route along that sequence is a shortest path from junction 1 to junction N.
Each of the next M lines describes one street. The i-th of those lines contains three integers ai, bi, ci, meaning a street of length ci between junction ai and junction bi. (1≤ai,bi≤N, 1≤ci≤10000) Every street is undirected.
Several streets can connect the same pair of junctions. Between two successive junctions a and b of your daily route, that route uses a street of minimal length between a and b.
Print yes on one line if you can take another route without losing time, and no otherwise.