N,M,K=map(int,input().split()) X=list(map(int,input().split())) Xset=set(X[i]-1 for i in range(K)) edge=[[] for _ in range(N)] for _ in range(M): u,v=map(int,input().split()) edge[u-1].append(v-1) edge[v-1].append(u-1) exp2=[2**i for i in range(N+10)] for i in range(N): dp=[[False for _ in range(N)] for _ in range(2**N)] turn=[set() for _ in range(N+1)] dp[exp2[i]][i]=True for j in range(2**N): bit_count=j.bit_count() for k in range(N): if dp[j][k]: turn[bit_count].add(k) for t in edge[k]: if j&exp2[t]==0: dp[j+exp2[t]][t]=True #print(dp) for i in range(N+1): #print(turn,Xset) if Xset & turn[i] == Xset: print('Yes') exit(0) print('No')