n, m = map(int,input().split()) s, g = map(int,input().split()) s -= 1; g -= 1 class dsu(): n=1 parent_or_size=[-1 for i in range(n)] def __init__(self,N): self.n=N self.parent_or_size=[-1 for i in range(N)] def merge(self,a,b): assert 0<=a0: result2.append(result[i]) return result2 graph = [[] for _ in range(n)] uv = [list(map(int,input().split())) for _ in range(m)] u = int(input()) I = set(map(int,input().split())) U = dsu(n) for u, v in uv: if u in I or v in I: continue else: U.merge(u - 1, v - 1) print('Yes' if U.same(s, g) else 'No')