#include<bits/stdc++.h> using namespace std; using ll = long long; #define all(p) p.begin(),p.end() #define rep(i,a,b) for(int i=(int)a;i<(int)b;i++) const int mod=998244353; int main(){ int N,K,M,P; cin>>N>>K>>M>>P; vector<vector<int>> G(N); rep(i,0,M){ int a,b; cin>>a>>b; a--,b--; G[a].push_back(b); G[b].push_back(a); } struct event { int type; int time; int ind; }; auto comp_event=[&](event l,event r)->bool{ if(l.time==r.time) return l.type>r.type; return l.time>r.time; }; vector<int> p(N); priority_queue<event,vector<event>,std::function<bool(event,event)>> pq(comp_event); vector<int> S(N); rep(i,0,N) cin>>S[i]; rep(i,0,K){ int x; cin>>x; x--; pq.push({1,P,x}); pq.push({2,S[x],x}); p[x]++; } int ans=0; while(!pq.empty()){ auto tmp=pq.top(); pq.pop(); //cout<<tmp.type<<" "<<tmp.time<<" "<<tmp.ind+1<<endl; if(tmp.type==1){ if(p[tmp.ind]!=-1) p[tmp.ind]=-2; } if(tmp.type==2){ if(p[tmp.ind]==-1) continue; for(auto x:G[tmp.ind]){ if(p[x]==-1||p[x]==-2) continue; p[x]++; if(p[x]==1){ pq.push({2,tmp.time+S[x],x}); pq.push({1,tmp.time+P,x}); } if(p[x]==2){ pq.push({3,tmp.time,x}); } } } if(tmp.type==3){ ans++; p[tmp.ind]=-1; } } cout<<ans<<"\n"; }