#include <bits/stdc++.h>
using namespace std;
struct MCMF {
  struct Edge {
    int to, cap, cost, rev;
    Edge(int to, int cap, int cost) : to(to), cap(cap), cost(cost) {}
  };
  vector<Edge> G[11111];
  int N, src, sink, dist[11111], work[11111];
  bool chk[11111];
  MCMF(int N, int src, int sink) : N(N), src(src), sink(sink) {}
  void add_edge(int f, int t, int cap, int cost) {
    G[f].emplace_back(t, cap, cost);
    G[t].emplace_back(f, 0, -cost);
    G[f].back().rev = G[t].size() - 1;
    G[t].back().rev = G[f].size() - 1;
  }
  void add_edge_from_source(int t, int cap, int cost) {
    add_edge(src, t, cap, cost);
  }
  void add_edge_to_sink(int f, int cap, int cost) {
    add_edge(f, sink, cap, cost);
  }
  void prep() {
    int temp = 0;
    queue<int> Q;
    memset(dist, 0x7f, sizeof(dist));
    memset(chk, 0, sizeof(chk));
    dist[src] = 0;
    Q.push(src);
    while (!Q.empty()) {
      int c = Q.front();
      Q.pop();
      chk[c] = false;
      for (auto &e : G[c])
        if (e.cap > 0 && dist[e.to] > dist[c] + e.cost) {
          dist[e.to] = dist[c] + e.cost;
          if (!chk[e.to]) {
            chk[e.to] = true;
            Q.push(e.to);
          }
        }
    }
    temp = dist[sink] - dist[src];
    for (int i = 0; i < N; i++)
      for (auto &e : G[i]) e.cost += dist[i] - dist[e.to];
    memset(dist, 0x7f, sizeof(dist));
    dist[src] = 0;
    Q.push(src);
    while (!Q.empty()) {
      int c = Q.front();
      Q.pop();
      chk[c] = false;
      for (auto &e : G[c])
        if (e.cap > 0 && dist[e.to] > dist[c] + e.cost) {
          dist[e.to] = dist[c] + e.cost;
          if (!chk[e.to]) {
            chk[e.to] = true;
            Q.push(e.to);
          }
        }
    }
    for (int i = 0; i < N; i++) dist[i] += temp;
  }
  int dfs(int c, int MF = 0x7fffffff) {
    int flow;
    chk[c] = true;
    if (c == sink) return MF;
    for (int &i = work[c]; i < G[c].size(); i++) {
      auto &e = G[c][i];
      if (e.cap > 0 && !chk[e.to] && dist[e.to] == dist[c] + e.cost &&
          (flow = dfs(e.to, min(e.cap, MF)))) {
        e.cap -= flow;
        G[e.to][e.rev].cap += flow;
        return flow;
      }
    }
    return 0;
  }
  int flow() {
    int ret = 0;
    for (prep(); memset(work, 0, sizeof(work)); memset(chk, 0, sizeof(chk))) {
      int M = 0x7fffffff;
      while (int temp = dfs(src)) {
        ret += temp * dist[sink];
        memset(chk, 0, sizeof(chk));
      }
      for (int i = 0; i < N; i++)
        if (chk[i])
          for (auto &e : G[i])
            if (e.cap > 0 && !chk[e.to])
              M = min(M, dist[i] + e.cost - dist[e.to]);
      if (M == 0x7fffffff) break;
      for (int i = 0; i < N; i++)
        if (!chk[i]) dist[i] += M;
    }
    return ret;
  }
};
int N;
int convert(int t, int c) { return t * N + c; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ((void)0);
  ((void)0);
  ((void)0);
  int M, K, C, D;
  cin >> N >> M >> K >> C >> D;
  MCMF mf(101 * N + 2, 101 * N, 101 * N + 1);
  for (int j = 1; j <= 100; j++) {
    mf.add_edge_to_sink(convert(j, 0), 0x7fffffff, 0);
    for (int i = 1; i < N; i++)
      mf.add_edge(convert(j - 1, i), convert(j, i), 0x7fffffff, C);
  }
  for (int i = 0; i < K; i++) {
    int a;
    cin >> a;
    mf.add_edge_from_source(convert(0, --a), 1, 0);
  }
  while (M--) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    for (int i = 1; i <= 100; i++)
      for (int j = 0; j < K; j++) {
        mf.add_edge(convert(i - 1, a), convert(i, b), 1, D * (2 * j + 1) + C);
        mf.add_edge(convert(i - 1, b), convert(i, a), 1, D * (2 * j + 1) + C);
      }
  }
  cout << mf.flow() << '\n';
  return 0;
}
