#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
const int mod = (1e9) + 7, mod2 = 998244353;
const long double eps = 1e-20;
const int siz = 4902 + 5, siz2 = 3e5 + 5, lg = 31, block = 317, block2 = 1000,
          mxv = 5e5;
int n, m, k, c, d, crlvco[55], src = 0, snk, dis[siz], phi[siz], pred[siz],
                               lstl = 98;
vector<int> oadj[55], mfadj[siz];
struct edge {
  int v, cap, t;
};
vector<edge> es;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>>
    pq;
int add(int a, int b) {
  if (max(a, b) == INT_MAX) {
    return INT_MAX;
  }
  return a + b;
}
void addedge(int u, int v, int cap, int t) {
  int sz = es.size();
  es.push_back({v, cap, t});
  mfadj[u].push_back(sz);
  es.push_back({u, 0, t});
  mfadj[v].push_back(sz + 1);
}
void build() {
  for (int i = 2; i <= n; i++) {
    if (crlvco[i]) {
      addedge(0, i, crlvco[i], 0);
    }
  }
  for (int i = 0; i < lstl; i++) {
    addedge(i * n + 1, snk, k, 0);
    for (int j = 2; j <= n; j++) {
      for (int a : oadj[j]) {
        if (i == lstl - 1 && a != 1) {
          continue;
        }
        addedge(i * n + j, (i + 1) * n + a, k, 2);
      }
      if (i == lstl - 1) {
        continue;
      }
      addedge(i * n + j, (i + 1) * n + j, k, 1);
    }
  }
  addedge(lstl * n + 1, snk, k, 0);
}
int getcost(int ind) {
  int t = es[ind].t, sign = ind % 2 ? -1 : 1;
  if (t == 0) {
    return 0;
  }
  if (t == 1) {
    return c * sign;
  }
  int used;
  if (sign == 1) {
    used = es[ind ^ 1].cap;
    return c + d * (1 + used * 2);
  }
  used = es[ind].cap;
  return sign * (c + d * (1 + (used - 1) * 2));
}
void resetdis() {
  for (int i = 1; i <= snk; i++) {
    dis[i] = INT_MAX;
  }
}
void dijkstra() {
  resetdis();
  pq.push({0, 0});
  while (!pq.empty()) {
    pair<int, int> bst = pq.top();
    pq.pop();
    int node = bst.first, tdis = bst.second;
    if (tdis > dis[node]) {
      continue;
    }
    for (int a : mfadj[node]) {
      edge &e = es[a];
      if (e.cap == 0) {
        continue;
      }
      int w = add(getcost(a), phi[node] - phi[e.v]);
      int ndis = add(tdis, w);
      if (ndis < dis[e.v]) {
        dis[e.v] = ndis;
        pred[e.v] = a;
        pq.push({e.v, ndis});
      }
    }
  }
}
int solve() {
  int tot = 0;
  while (true) {
    dijkstra();
    if (dis[snk] == INT_MAX) {
      return tot;
    }
    int cur = snk;
    while (cur != src) {
      int p = pred[cur];
      tot += getcost(p);
      es[p].cap--;
      es[p ^ 1].cap++;
      cur = es[p ^ 1].v;
    }
    for (int i = 1; i <= snk; i++) {
      phi[i] = add(phi[i], dis[i]);
    }
  }
}
int main() {
  scanf("%d%d%d%d%d", &n, &m, &k, &c, &d);
  snk = lstl * n + 2;
  for (int i = 0; i < k; i++) {
    int ai;
    scanf("%d", &ai);
    crlvco[ai]++;
  }
  for (int i = 0; i < m; i++) {
    int xi, yi;
    scanf("%d%d", &xi, &yi);
    oadj[xi].push_back(yi);
    oadj[yi].push_back(xi);
  }
  build();
  printf("%d\n", solve());
  return 0;
}
