int1=lambda x:int(x)-1 n,m=map(int,input().split()) s,g=map(int1,input().split()) edge=[[] for i in range(n)] for _ in range(m): u,v=map(int1,input().split()) edge[u].append(v) edge[v].append(u) u=int(input()) I=map(int1,input().split()) ng=[True]*n for i in I: ng[i]=False seen=[True]*n d=[s] while d: x=d.pop() if x==g: print('Yes') exit() seen[x]=False for i in edge[x]: if seen[i] and ng[i]: d.append(i) print('No')