#include using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; int main() { int N, M, K; cin >> N >> M >> K; vector X(K); for (int i = 0; i < K; i++) cin >> X[i], X[i]--; vector> G(N); for (int i = 0; i < M; i++) { int u, v; cin >> u >> v; u--; v--; G[u].push_back(v); G[v].push_back(u); } vector ok(N, vector(N, vector(N + 1, false))); for (int t = 0; t < N; t++) { ok[t][t][0] = true; vector> dp(1 << N, vector(N, false)); dp[1 << t][t] = true; for (int s = 0; s < 1 << N; s++) { for (int i = 0; i < N; i++) { if (!dp[s][i]) continue; for (int j : G[i]) { if (s >> j & 1) continue; dp[s | 1 << j][j] = true; ok[t][j][__builtin_popcount(s)] = true; } } } } bool ans = false; for (int i = 0; i < N; i++) { for (int j = 0; j <= N; j++) { bool res = true; for (int x : X) { if (!ok[x][i][j]) res = false; } if (res) ans = true; } } puts(ans ? "Yes" : "No"); }