#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int inf = 1e9;
const int N = 100100;
struct Edge {
  int from, to, cap;
  long long cost;
  Edge(int from = 0, int to = 0, int cap = 0, long long cost = 0)
      : from(from), to(to), cap(cap), cost(cost) {}
};
vector<Edge> edges;
vector<int> G[N];
int S, T, n, p[N], a[N];
long long d[N];
bool inq[N];
bool SPFA(int& flow, long long& cost) {
  for (int i = 1; i <= n; i++) d[i] = INF, inq[i] = 0;
  d[S] = 0;
  inq[S] = 1;
  p[S] = 0;
  a[S] = inf;
  queue<int> Q;
  Q.push(S);
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    inq[u] = 0;
    for (int i : G[u]) {
      Edge& e = edges[i];
      if (e.cap && d[e.to] > d[u] + e.cost) {
        d[e.to] = d[u] + e.cost;
        p[e.to] = i;
        a[e.to] = min(a[u], e.cap);
        if (!inq[e.to]) {
          Q.push(e.to);
          inq[e.to] = 1;
        }
      }
    }
  }
  if (d[T] == INF) return false;
  flow += a[T];
  cost += d[T] * a[T];
  for (int u = T; u != S; u = edges[p[u]].from) {
    edges[p[u]].cap -= a[T];
    edges[p[u] ^ 1].cap += a[T];
  }
  return true;
}
void add_edge(int x, int y, int z, int w) {
  G[x].push_back(edges.size());
  edges.emplace_back(x, y, z, w);
  G[y].push_back(edges.size());
  edges.emplace_back(y, x, 0, -w);
}
long long mcmf() {
  int flow = 0;
  long long cost = 0;
  while (SPFA(flow, cost))
    ;
  return cost;
}
int m, cnt, K, C, D, id[200][100];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> K >> C >> D;
  for (int i = 0; i <= n + K; ++i)
    for (int j = 1; j <= n; ++j) id[i][j] = ++cnt;
  S = ++cnt;
  T = ++cnt;
  for (int i = 0; i <= n + K; ++i) add_edge(id[i][1], T, inf, 0);
  for (int i = 0; i < n + K; ++i)
    for (int j = 1; j <= n; ++j) add_edge(id[i][j], id[i + 1][j], inf, C);
  for (int i = 1; i <= K; ++i) {
    int x;
    cin >> x;
    add_edge(S, id[0][x], 1, 0);
  }
  for (int i = 1; i <= m; ++i) {
    int x, y;
    cin >> x >> y;
    for (int j = 0; j < n + K; ++j)
      for (int k = 0; k < K; ++k) {
        add_edge(id[j][x], id[j + 1][y], 1, C + (2 * k + 1) * D);
        add_edge(id[j][y], id[j + 1][x], 1, C + (2 * k + 1) * D);
      }
  }
  n = cnt;
  cout << mcmf() << '\n';
  return 0;
}
