from collections import deque n,m = map(int,input().split()) a,b = map(int,input().split()) to = [[] for _ in range(n)] for _ in range(m): f,t = map(int,input().split()) to[f-1].append(t-1) to[t-1].append(f-1) u = int(input()) if(u != 0): i = set(map(int,input().split())) else: i = set() visited = [False] * n que = deque() que.append(a-1) visited[a-1] = True while(que): a = que.popleft() for v in to[a]: if((visited[v] == False) & (v not in i)): visited[v] = True que.append(v) if(visited[b-1]): print('Yes') else: print('No')