import sys input = sys.stdin.readline N,M,K=map(int,input().split()) X=list(map(int,input().split())) for i in range(K): X[i]-=1 E=[[] for i in range(N)] for i in range(M): u,v=map(int,input().split()) u-=1 v-=1 E[u].append(v) E[v].append(u) def calc(x): LIST=[set() for i in range(N)] LIST[0].add(x) Q=[(x,1<0: print("Yes") exit() print("No")