#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <typename flow_t, typename cost_t>
struct MinCostFlow {
  const cost_t INF;
  struct edge {
    int to;
    flow_t cap;
    cost_t cost;
    int rev;
  };
  vector<vector<edge>> graph;
  vector<cost_t> potential, min_cost;
  vector<int> prevv, preve;
  MinCostFlow(int V) : graph(V), INF(numeric_limits<cost_t>::max()) {}
  void add_edge(int from, int to, flow_t cap, cost_t cost) {
    graph[from].emplace_back((edge){to, cap, cost, (int)graph[to].size()});
    graph[to].emplace_back((edge){from, 0, -cost, (int)graph[from].size() - 1});
  }
  cost_t min_cost_flow(int s, int t, flow_t f) {
    int V = (int)graph.size();
    cost_t ret = 0;
    using Pi = pair<cost_t, int>;
    priority_queue<Pi, vector<Pi>, greater<Pi>> PQ;
    potential.assign(V, 0);
    preve.assign(V, -1);
    prevv.assign(V, -1);
    while (f > 0) {
      min_cost.assign(V, INF);
      PQ.emplace(0, s);
      min_cost[s] = 0;
      while (!PQ.empty()) {
        cost_t d;
        int now;
        tie(d, now) = PQ.top();
        PQ.pop();
        if (min_cost[now] < d) continue;
        for (int i = 0; i < graph[now].size(); i++) {
          edge &e = graph[now][i];
          cost_t nextCost =
              min_cost[now] + (e.cost + potential[now] - potential[e.to]);
          if (e.cap > 0 && min_cost[e.to] > nextCost) {
            min_cost[e.to] = nextCost;
            prevv[e.to] = now;
            preve[e.to] = i;
            PQ.emplace(min_cost[e.to], e.to);
          }
        }
      }
      if (min_cost[t] == INF) return -1;
      for (int v = 0; v < V; v++) potential[v] += min_cost[v];
      flow_t addflow = f;
      for (int v = t; v != s; v = prevv[v]) {
        addflow = min(addflow, graph[prevv[v]][preve[v]].cap);
      }
      f -= addflow;
      ret += addflow * potential[t];
      for (int v = t; v != s; v = prevv[v]) {
        edge &e = graph[prevv[v]][preve[v]];
        e.cap -= addflow;
        graph[v][e.rev].cap += addflow;
      }
    }
    return ret;
  }
};
int N, M, K, C, D;
vector<int> A;
const int T = 101;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> M >> K >> C >> D;
  A.resize(K);
  for (int i = 0; i < K; i++) cin >> A[i];
  vector<int> P(N + 1, 0);
  for (int i = 0; i < K; i++) P[A[i]]++;
  MinCostFlow<int, int> mcf(N * T + 2);
  int start = 0, end = N * T + 1;
  for (int i = 1; i <= N; i++) mcf.add_edge(start, i, P[i], 0);
  for (int t = 0; t < T; t++) mcf.add_edge(1 + N * t, end, K, C * t);
  for (int t = 0; t < T - 1; t++) {
    for (int i = 1; i <= N; i++) {
      mcf.add_edge(i + t * N, i + (t + 1) * N, K, 0);
    }
  }
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    for (int t = 0; t < T - 1; t++) {
      for (int j = 1; j <= K; j++) {
        int x = a + t * N;
        int y = b + (t + 1) * N;
        mcf.add_edge(x, y, 1, D * (2 * j - 1));
        int w = a + (t + 1) * N;
        int z = b + t * N;
        mcf.add_edge(z, w, 1, D * (2 * j - 1));
      }
    }
  }
  cout << mcf.min_cost_flow(start, end, K) << endl;
  return 0;
}
