#include <bits/stdc++.h>
using namespace std;
const int MT = 102, Nmic = 55, Nmax = MT * Nmic, Mmax = 4 * Nmax * Nmic;
int n, cnt[Nmax], edges[Nmic][Nmic];
int CC, DD, K;
class Graph {
  int S, D, nr = 0;
  vector<int> v[Nmax];
  bool inQ[Nmax];
  int dist[Nmax];
  int to[Mmax], cap[Mmax], cost[Mmax], t[Nmax];
  bool bellman() {
    int node = S;
    queue<int> q;
    memset(inQ, 0, sizeof(inQ));
    memset(t, -1, sizeof(t));
    int i;
    for (i = 0; i <= n * MT + n; ++i) dist[i] = 1e9;
    q.push(node);
    inQ[node] = 1;
    t[node] = 0;
    dist[node] = 0;
    while (q.size()) {
      node = q.front();
      q.pop();
      inQ[node] = 0;
      for (auto it : v[node])
        if (cap[it] && dist[to[it]] > dist[node] + cost[it]) {
          t[to[it]] = it;
          dist[to[it]] = dist[node] + cost[it];
          if (!inQ[to[it]]) inQ[to[it]] = 1, q.push(to[it]);
        }
    }
    return (t[D] != -1);
  }
  void add_edge(int x, int y, int Cap, int Cost) {
    v[x].push_back(nr);
    cap[nr] = Cap;
    cost[nr] = Cost;
    to[nr] = y;
    ++nr;
    v[y].push_back(nr);
    cap[nr] = 0;
    cost[nr] = -Cost;
    to[nr] = x;
    ++nr;
  }

 public:
  void init() {
    S = 0;
    D = n * MT + 1;
    int i, j;
    for (i = 2; i <= n; ++i) add_edge(S, i, cnt[i], 0);
    int t, k;
    for (t = 1; t <= MT; ++t)
      for (i = 2; i <= n; ++i) {
        add_edge(n * (t - 1) + i, n * t + i, K, CC);
        for (j = 1; j <= n; ++j)
          if (edges[i][j])
            for (k = 0; k < K; ++k)
              add_edge(n * (t - 1) + i, n * t + j, edges[i][j],
                       CC + (2 * k + 1) * DD);
      }
    for (t = 0; t < MT; ++t) add_edge(n * t + 1, n * (t + 1) + 1, K, 0);
  }
  int solve() {
    int ans = 0, total_flow = 0;
    while (bellman()) {
      int node = D;
      int cst = 0;
      int flow = 1e9;
      while (node != S) {
        cst += cost[t[node]];
        flow = min(flow, cap[t[node]]);
        node = to[t[node] ^ 1];
      }
      ans += flow * cst;
      total_flow += flow;
      node = D;
      while (node != S) {
        cap[t[node]] -= flow;
        cap[t[node] ^ 1] += flow;
        node = to[t[node] ^ 1];
      }
    }
    return ans;
  }
} graph;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int x, y, i, m;
  cin >> n >> m >> K >> CC >> DD;
  for (i = 1; i <= K; ++i) {
    cin >> x;
    cnt[x]++;
  }
  for (i = 1; i <= m; ++i) {
    cin >> x >> y;
    ++edges[x][y];
    ++edges[y][x];
  }
  graph.init();
  cout << graph.solve() << '\n';
  return 0;
}
