#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() int main() { cin.tie(nullptr); int N, M, S, G; cin >> N >> M >> S >> G; S--, G--; vector> Graph(N, vector()); rep(i, 0, M) { int F, T; cin >> F >> T; F--, T--; Graph[F].push_back(T); Graph[T].push_back(F); } queue que; vector seen(N, false); int U; cin >> U; rep(i, 0, U) { int I; cin >> I; seen[I - 1] = true; } que.push(S); while (!que.empty()) { int v = que.front(); que.pop(); seen[v] = true; for (int next : Graph[v]) { if (seen[next]) continue; que.push(next); } } if (seen[G]) cout << "Yes\n"; else cout << "No\n"; }