#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define Inf 1000000001 int main(){ int N,M; cin>>N>>M; int s,g; cin>>s>>g; s--;g--; vector f(M),t(M); rep(i,M){ cin>>f[i]>>t[i]; f[i]--;t[i]--; } vector ng(N,false); int U; cin>>U; rep(_,U){ int x; cin>>x; ng[x-1] = true; } dsu D(N); rep(i,M){ if(ng[f[i]] || ng[t[i]])continue; D.merge(f[i],t[i]); } if(D.same(s,g))cout<<"Yes"<