import sys input = lambda: sys.stdin.readline().rstrip() 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 nm = list(map(str,input().split())) n = int(nm[0]) m = int(nm[1]) sg = list(map(str,input().split())) s = int(sg[0]) g = int(sg[1]) uv = [list(map(int,input().split())) for _ in range(m)] u = int(list(map(str,input().split()))[0]) I = list(map(str,input().split()))[:u] I = list(map(int, I)) U = dsu(10 * n) for u, v in uv: if (u in I) or (v in I): continue else: U.merge(u, v) print('Yes' if U.same(s, g) else 'No')