#include using namespace std; //#pragma GCC optimize("Ofast") #define rep(i,n) for(ll i=0;i=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define pqueue(x) priority_queue,greater> #define all(x) (x).begin(),(x).end() #define CST(x) cout<> #define rev(x) reverse(x); using ll=long long; using vl=vector; using vvl=vector>; using pl=pair; using vpl=vector; using vvpl=vector; const ll MOD=1000000007; const ll MOD9=998244353; const int inf=1e9+10; const ll INF=4e18; const ll dy[9]={0,1,-1,0,1,1,-1,-1,0}; const ll dx[9]={1,0,0,-1,1,-1,1,-1,0}; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } int main(){ ll n,k,m,P;cin >> n >> k >> m >> P; vvl g(n); rep(i,m){ ll a,b;cin >> a >> b;a--;b--; g[a].emplace_back(b); g[b].emplace_back(a); } vl s(n);rep(i,n)cin >> s[i]; vl state(n);//0なら何も持ってない、1なら感染、2なら免疫、3なら検疫 priority_queue,vector>,greater>> event; //時刻、イベント=0なら、免疫獲得、1なら感染、2なら検疫、idx rep(i,k){ ll a;cin >> a;a--; state[a]=1; event.push({P,0,a}); event.push({s[a],1,a}); } // ll time=-1; while(event.size()){ auto [t,ev,id]=event.top();event.pop(); /*if(time!=t){ for(auto p:state)cout << p <<" ";cout << endl; time=t; }*/ if(ev==0){ if(state[id]!=3)state[id]=2; } else if(ev==1){ if(state[id]==3)continue; for(auto p:g[id]){ if(state[p]==0){ state[p]=1; event.push({t+P,0,p}); event.push({t+s[p],1,p}); } else if(state[p]==1){ event.push({t,2,p}); } } } else { state[id]=3; } } ll ans=0; rep(i,n)if(state[i]==3)ans++; cout << ans << endl; }