#include using namespace std; using ll = long long; using pli = pair; int main(){ int n, k, m, p; cin >> n >> k >> m >> p; vector> g(n); while (m--){ int u, v; cin >> u >> v; u--, v--; g[u].emplace_back(v); g[v].emplace_back(u); } vector s(n); for (int i = 0; i < n; i++) cin >> s[i]; /* 0 : none 1 : infected 2 : cured 3 : infected again */ vector status(n,0); priority_queue,greater> pque; auto id = [&](ll t, int type){ return t * 3 + type; }; while (k--){ int x; cin >> x; x--; pque.push(pli(id(0,2),x)); } int ans = 0; while (!pque.empty()){ auto [tt, v] = pque.top(); pque.pop(); ll t = tt / 3; int type = tt % 3; if (type == 0){ if (status[v] == 3) continue; status[v] = 2; } if (type == 1){ if (status[v] == 3) continue; for (int u : g[v]){ pque.push(pli(id(t,2),u)); } } if (type == 2){ if (status[v] >= 2) continue; if (status[v] == 0){ status[v] = 1; pque.push(pli(id(t+s[v],1),v)); pque.push(pli(id(t+p,0),v)); } else { ans++; status[v] = 3; } } } cout << ans << endl; }