def uf_find(n,p): ufl = [] while p[n] != n: ufl.append(n) n = p[n] for i in ufl: p[i] = n return n def uf_union(a,b,p,rank): ap = uf_find(a,p) bp = uf_find(b,p) if ap == bp: return True else: if rank[ap] > rank[bp]: p[bp] = ap elif rank[ap] < rank[bp]: p[ap] = bp else: p[bp] = ap rank[ap] += 1 return False N,M = map(int,input().split()) S,G = map(int,input().split()) S -= 1; G -= 1 e = [] for i in range(M): F,T = map(int,input().split()) F -= 1 T -= 1 e.append((F,T)) U = int(input()) I = [] if U == 0 else list(map(int,input().split())) for i in range(len(I)): I[i] -= 1 s = set(I) p = [i for i in range(N)] rank = [0] * N for u,v in e: if u not in s and v not in s: uf_union(u,v,p,rank) if uf_find(S,p) == uf_find(G,p): print ("Yes") else: print ("No")