n,m=map(int,input().split()) S,G=map(int,input().split()) g=[[] for _ in range(n+1)] for _ in range(m): f,t=map(int,input().split()) g[f].append(t) g[t].append(f) u=int(input()) I=list(map(int,input().split())) for i in I: g[i].clear() visit=[False]*(n+1) visit[S]=True from collections import deque q=deque() q.append(S) while q: now=q.popleft() for to in g[now]: if visit[to]==False: visit[to]=True q.append(to) if visit[G]: print('Yes') else: print('No')