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