#include <bits/stdc++.h>
using namespace std;
const int NN = 6666, inf = 1 << 30;
struct edge {
  int to, capacity, cost, rev;
  edge() {}
  edge(int to, int _capacity, int _cost, int _rev)
      : to(to), capacity(_capacity), cost(_cost), rev(_rev) {}
};
struct Min_Cost_Max_Flow {
  int V, H[NN + 5], dis[NN + 5], PreV[NN + 5], PreE[NN + 5];
  vector<edge> G[NN + 5];
  void Init(int n) {
    V = n;
    for (int i = 0; i <= V; ++i) G[i].clear();
  }
  void add_edge(int from, int to, int cap, int cost) {
    G[from].push_back(edge(to, cap, cost, G[to].size()));
    G[to].push_back(edge(from, 0, -cost, G[from].size() - 1));
  }
  int minCost(int s, int t, int f) {
    int flow = 0;
    int res = 0;
    fill(H, H + 1 + V, 0);
    while (f) {
      priority_queue<pair<int, int>, vector<pair<int, int> >,
                     greater<pair<int, int> > >
          q;
      fill(dis, dis + 1 + V, inf);
      dis[s] = 0;
      q.push(pair<int, int>(0, s));
      while (!q.empty()) {
        pair<int, int> now = q.top();
        q.pop();
        int v = now.second;
        if (dis[v] < now.first) continue;
        for (int i = 0; i < G[v].size(); ++i) {
          edge& e = G[v][i];
          if (e.capacity > 0 && dis[e.to] > dis[v] + e.cost) {
            dis[e.to] = dis[v] + e.cost;
            PreV[e.to] = v;
            PreE[e.to] = i;
            q.push(pair<int, int>(dis[e.to], e.to));
          }
        }
      }
      if (dis[t] == inf) break;
      int d = f;
      for (int v = t; v != s; v = PreV[v])
        d = min(d, G[PreV[v]][PreE[v]].capacity);
      f -= d;
      flow += d;
      res += d * dis[t];
      for (int v = t; v != s; v = PreV[v]) {
        edge& e = G[PreV[v]][PreE[v]];
        e.capacity -= d;
        G[v][e.rev].capacity += d;
      }
    }
    return res;
  }
} mcmf;
int main() {
  int n, m, k, c, d, u, v;
  cin >> n >> m >> k >> c >> d;
  mcmf.Init(n * (n + 55) + 10);
  int src = n * (n + 55) + 1, tar = src + 2;
  for (int i = 1; i <= k; i++) {
    cin >> u;
    mcmf.add_edge(src, u, 1, 0);
  }
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    for (int j = 1; j <= n + 54; j++) {
      for (int r = 1; r <= k; r++) {
        mcmf.add_edge(j * n - n + u, j * n + v, 1, d * (2 * r - 1));
        mcmf.add_edge(j * n - n + v, j * n + u, 1, d * (2 * r - 1));
      }
    }
  }
  for (int i = 0; i < n + 55; i++) {
    if (i)
      for (int j = 1; j <= n; j++)
        mcmf.add_edge(i * n + j - n, i * n + j, k, 0);
    mcmf.add_edge(i * n + 1, tar, k, c * i);
  }
  cout << mcmf.minCost(src, tar, k) << endl;
  return 0;
}
