from collections import defaultdict, deque n, m = map(int, input().split()) s, g = map(int, input().split()) edge = defaultdict(list) for _ in range(m): f, t = map(int, input().split()) edge[f].append(t) edge[t].append(f) _ = int(input()) seen = set(map(int, input().split())) seen.add(s) Que = deque([s]) while Que: curr = Que.popleft() if curr == g: print("Yes") exit() for np in edge[curr]: if np in seen: continue seen.add(np) Que.append(np) print("No")