#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 100 + 15;
int SRC = MAXN - 1;
int SNC = MAXN - 2;
const long long INFFLUJO = 1e14;
const long long INFCOSTO = 1e14;
struct edge {
  int u, v;
  long long cap, flow;
  long long cost;
  long long rem() { return cap - flow; }
};
int nodes = MAXN;
vector<int> g[MAXN];
vector<edge> e;
void add_edge(int u, int v, long long cap, long long cost) {
  string dem = to_string(u), pen = to_string(v);
  if (u == SRC) dem = "SRC";
  if (u == SNC) dem = "SINC";
  if (v == SRC) pen = "SRC";
  if (v == SNC) pen = "SINC";
  g[u].push_back(((int)(e).size()));
  e.push_back((edge){u, v, cap, 0, cost});
  g[v].push_back(((int)(e).size()));
  e.push_back((edge){v, u, 0, 0, -cost});
}
long long dist[MAXN], mncost;
int pre[MAXN];
long long cap[MAXN], mxflow;
bool in_queue[MAXN];
void flow(int s, int t) {
  memset(in_queue, 0, sizeof(in_queue));
  mxflow = mncost = 0;
  while (1) {
    fill(dist, dist + nodes, INFCOSTO);
    dist[s] = 0;
    memset(pre, -1, sizeof(pre));
    pre[s] = 0;
    memset(cap, 0, sizeof(cap));
    cap[s] = INFFLUJO;
    queue<int> q;
    q.push(s);
    in_queue[s] = 1;
    while (((int)(q).size())) {
      int u = q.front();
      q.pop();
      in_queue[u] = 0;
      for (int _ = 0; _ < ((int)(g[u]).size()); _++) {
        int i = g[u][_];
        edge &E = e[i];
        if (E.rem() && dist[E.v] > dist[u] + E.cost + 1e-9) {
          dist[E.v] = dist[u] + E.cost;
          pre[E.v] = i;
          cap[E.v] = min(cap[u], E.rem());
          if (!in_queue[E.v]) q.push(E.v), in_queue[E.v] = 1;
        }
      }
    }
    if (pre[t] < 0) break;
    mxflow += cap[t];
    mncost += cap[t] * dist[t];
    for (int v = t; v != s; v = e[pre[v]].u) {
      e[pre[v]].flow += cap[t];
      e[pre[v] ^ 1].flow -= cap[t];
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  long long n, m, k, c, d;
  cin >> n >> m >> k >> c >> d;
  int MAXT = n + k + 1;
  vector<int> a(k);
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
    add_edge(SRC, a[i] * MAXT, 1, 0);
  }
  for (int j = 0; j < MAXT; j++) add_edge(j, SNC, k, 0);
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    for (int j = 0; j < MAXT - 1; j++)
      for (int K = 1; K < k + 1; K++) {
        add_edge(x * MAXT + j, y * MAXT + j + 1, 1,
                 c + (d * K * K) - (d * (K - 1) * (K - 1)));
      }
    for (int j = 0; j < MAXT - 1; j++)
      for (int K = 1; K < k + 1; K++) {
        add_edge(y * MAXT + j, x * MAXT + j + 1, 1,
                 c + (d * K * K) - (d * (K - 1) * (K - 1)));
      }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < MAXT - 1; j++)
      for (int K = 1; K < k + 1; K++) {
        add_edge(i * MAXT + j, i * MAXT + j + 1, 1, c);
      }
  }
  flow(SRC, SNC);
  cout << mncost << endl;
}
