#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
struct MCF {
  int n;
  vector<int> prio, curflow, prevedge, prevnode, pot;
  priority_queue<long long, vector<long long>, greater<long long>> q;
  struct edge {
    int to, rev;
    int f, cap, cost;
  };
  vector<vector<edge>> g;
  MCF(int n)
      : n(n), prio(n), curflow(n), prevedge(n), prevnode(n), pot(n), g(n) {}
  void add_edge(int s, int t, int cap, int cost) {
    g[s].push_back((edge){t, int(g[t].size()), 0, cap, cost});
    g[t].push_back((edge){s, int(g[s].size()) - 1, 0, 0, -cost});
  }
  pair<int, int> get_flow(int s, int t) {
    int flow = 0, flowcost = 0;
    while (1) {
      q.push(s);
      fill(prio.begin(), prio.end(), INF);
      prio[s] = 0;
      curflow[s] = INF;
      while (!q.empty()) {
        long long cur = q.top();
        int d = cur >> 32, u = cur;
        q.pop();
        if (d != prio[u]) continue;
        for (int i = 0; i < int(g[u].size()); ++i) {
          edge &e = g[u][i];
          int v = e.to;
          if (e.cap <= e.f) continue;
          int nprio = prio[u] + e.cost + pot[u] - pot[v];
          if (prio[v] > nprio) {
            prio[v] = nprio;
            q.push(((long long)nprio << 32) + v);
            prevnode[v] = u;
            prevedge[v] = i;
            curflow[v] = min(curflow[u], e.cap - e.f);
          }
        }
      }
      if (prio[t] == INF) break;
      for (int i = 0, ThxDem = n; i < ThxDem; ++i) pot[i] += prio[i];
      int df = min(curflow[t], INF - flow);
      flow += df;
      for (int v = t; v != s; v = prevnode[v]) {
        edge &e = g[prevnode[v]][prevedge[v]];
        e.f += df;
        g[v][e.rev].f -= df;
        flowcost += df * e.cost;
      }
    }
    return {flow, flowcost};
  }
};
int n, m, k, c, d;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k >> c >> d;
  MCF nt(6 + 107 * n);
  for (int _ = 0, ThxDem = k; _ < ThxDem; ++_) {
    int x;
    cin >> x;
    x--;
    nt.add_edge(0, 1 + x, 1, 0);
  }
  for (int _ = 0, ThxDem = m; _ < ThxDem; ++_) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    for (int i = 0, ThxDem = 105; i < ThxDem; ++i) {
      for (int j = 0, ThxDem = 51; j < ThxDem; ++j) {
        nt.add_edge(1 + i * n + x, 1 + (i + 1) * n + y, 1, c + d * (2 * j + 1));
        nt.add_edge(1 + i * n + y, 1 + (i + 1) * n + x, 1, c + d * (2 * j + 1));
      }
    }
  }
  for (int i = 0, ThxDem = 105; i < ThxDem; ++i)
    for (int j = 0, ThxDem = n; j < ThxDem; ++j)
      nt.add_edge(1 + i * n + j, 1 + (i + 1) * n + j, 51, c);
  for (int i = 0, ThxDem = 105; i < ThxDem; ++i)
    nt.add_edge(1 + i * n, 1 + 105 * n, 51, 0);
  auto ans = nt.get_flow(0, 1 + 105 * n);
  cout << ans.second << "\n";
}
