#include <bits/stdc++.h>
using i64 = long long;
constexpr i64 inf = std::numeric_limits<i64>::max() / 10;
class MinCostFlow {
  using i64 = long long;
  struct Edge {
    int from, to;
    i64 cap, cost;
    int rev;
    Edge(int from, int to, i64 cap, i64 cost, int rev)
        : from(from), to(to), cap(cap), cost(cost), rev(rev) {}
  };
  int size;
  std::vector<std::deque<Edge>> g;
  std::vector<i64> h;
  std::vector<i64> dist;
  std::vector<std::pair<int, int>> pred;
  std::priority_queue<std::pair<i64, int>> q;
  bool find_path(int s, int t) {
    std::fill(dist.begin(), dist.end(), inf);
    dist[s] = 0;
    q.emplace(0, s);
    while (!q.empty()) {
      auto p = q.top();
      q.pop();
      for (int i = 0; i < g[p.second].size(); i++) {
        auto &e = g[p.second][i];
        auto c = dist[e.from] + e.cost + h[e.from];
        if (e.cap > 0 && dist[e.to] + h[e.to] > c) {
          dist[e.to] = c - h[e.to];
          pred[e.to] = std::make_pair(p.second, i);
          q.emplace(-dist[e.to], e.to);
        }
      }
    }
    if (dist[t] == inf) return false;
    return true;
  }
  void update(int s, int t, i64 &flow, i64 &cost) {
    for (int i = 0; i < size; i++) h[i] += dist[i];
    i64 f = flow;
    for (int v = t; v != s;) {
      int p = pred[v].first, i = pred[v].second;
      auto &e = g[p][i];
      f = std::min(f, e.cap);
      v = p;
    }
    for (int v = t; v != s;) {
      int p = pred[v].first, i = pred[v].second;
      auto &e = g[p][i];
      e.cap -= f;
      g[e.to][e.rev].cap += f;
      v = p;
    }
    cost += f * h[t];
    flow -= f;
  }

 public:
  explicit MinCostFlow(int size)
      : size(size), g(size), h(size), dist(size), pred(size) {}
  void add_edge(int from, int to, i64 cap, i64 cost) {
    g[from].emplace_back(from, to, cap, cost, g[to].size());
    g[to].emplace_back(to, from, 0, -cost, g[from].size() - 1);
  }
  std::pair<i64, i64> calc(int s, int t, i64 k) {
    i64 flow = k, cost = 0;
    while (flow > 0) {
      auto found = find_path(s, t);
      if (!found) return {flow, cost};
      update(s, t, flow, cost);
    }
    return {flow, cost};
  }
};
int main() {
  int n, m, k, c, d;
  std::cin >> n >> m >> k >> c >> d;
  int tt = 105;
  int size = n * tt;
  int s = size, t = size + 1;
  MinCostFlow mfc(size + 2);
  for (int i = 0; i < k; i++) {
    int a;
    std::cin >> a;
    mfc.add_edge(s, a - 1, 1, 0);
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    std::cin >> u >> v;
    --u;
    --v;
    for (int j = 0; j < tt - 1; j++) {
      int t = n * j;
      for (int cap = 1; cap <= k; cap++) {
        mfc.add_edge(t + u, t + n + v, 1, d * (2 * cap - 1) + c);
        mfc.add_edge(t + v, t + n + u, 1, d * (2 * cap - 1) + c);
      }
    }
  }
  for (int i = 0; i <= tt - 1; i++) {
    mfc.add_edge(n * i + 0, t, inf, 0);
  }
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < tt - 1; j++) {
      int t = n * j;
      mfc.add_edge(t + i, t + n + i, inf, c);
    }
  }
  std::cout << mfc.calc(s, t, k).second << std::endl;
  return 0;
}
