#include using namespace std; int main () { int N, M, K; cin >> N >> M >> K; std::vector X(K); for (auto& x : X) { cin >> x; x --; } vector> gr(N); while (M--) { int a, b; cin >> a >> b; gr[--a].push_back(--b); } int cg[15][15]; for (int b = 0; b < N; b ++) { cg[b][0] = (1 << b); for (int i = 1; i < N; i ++) cg[b][i] = 0; vector dp((1 << N), vector(N, 0)); dp[1 << b][b] = 1; for (int s = (1 << b); s < (1 << N); s ++) { for (int i = 0; i < N; i ++) { if (!dp[s][i]) continue; int n = 0; for (int p = 0; p < N; p ++) n += ((s >> p) & 1); cg[b][n-1] |= (1 << i); for (auto& v : gr[i]) { if (!((s >> v) & 1)) { dp[s ^ (1 << v)][v] = 1; } } } } } for (int d = 0; d < N; d ++) { int x = (1 << N) - 1; for (auto& k : X) { x &= cg[k][d]; } if (x) { puts("Yes"); return 0; } } puts("No"); }