#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long LMAX = 100;
long long ec = 1, to[2000005], cap[2000005], w[2000005], nxt[2000005],
          hed[1000005] = {0};
void add_edge(long long f, long long t, long long c, long long d) {
  ++ec;
  to[ec] = t;
  cap[ec] = c;
  w[ec] = d;
  nxt[ec] = hed[f];
  hed[f] = ec;
  ++ec;
  to[ec] = f;
  cap[ec] = 0;
  w[ec] = -d;
  nxt[ec] = hed[t];
  hed[t] = ec;
}
long long dis[1000005], inq[1000005], flw[1000005];
long long pre[1000005], prv[1000005];
queue<long long> q;
long long spfa(long long s, long long t) {
  memset(dis, INF, sizeof(dis));
  memset(inq, 0, sizeof(inq));
  memset(flw, 0, sizeof(flw));
  prv[t] = -1;
  q.push(s);
  inq[s] = 1;
  dis[s] = 0;
  flw[s] = INF;
  while (!q.empty()) {
    long long u = q.front();
    q.pop();
    inq[u] = 0;
    for (long long i = hed[u]; i; i = nxt[i]) {
      long long v = to[i];
      if (dis[v] > dis[u] + w[i] && cap[i]) {
        dis[v] = dis[u] + w[i];
        prv[v] = u;
        pre[v] = i;
        flw[v] = min(flw[u], cap[i]);
        if (!inq[v]) {
          inq[v] = 1;
          q.push(v);
        }
      }
    }
  }
  return prv[t] != -1;
}
long long mxf = 0, mcf = 0;
void mcmf(long long s, long long t) {
  while (spfa(s, t)) {
    mxf += flw[t];
    mcf += flw[t] * dis[t];
    long long now = t;
    while (now != s) {
      cap[pre[now]] -= flw[t];
      cap[pre[now] ^ 1] += flw[t];
      now = prv[now];
    }
  }
}
long long n;
long long get_id(long long l, long long x) { return l * n + x; }
int main() {
  ios::sync_with_stdio(false);
  long long m, k, c, d, S, T, u, v;
  cin >> n >> m >> k >> c >> d;
  S = get_id(LMAX, n) + 1;
  T = S + 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 0; j < LMAX; j++) {
      add_edge(get_id(j, i), get_id(j + 1, i), INF, (i == 1 ? 0 : c));
    }
  }
  for (long long i = 1; i <= k; i++) {
    cin >> u;
    add_edge(S, get_id(0, u), 1, 0);
  }
  add_edge(get_id(LMAX, 1), T, INF, 0);
  while (m--) {
    cin >> u >> v;
    for (long long i = 0; i < LMAX; i++) {
      for (long long j = 1; j <= k; j++) {
        add_edge(get_id(i, u), get_id(i + 1, v), 1LL, d * ((j << 1) - 1LL) + c);
        add_edge(get_id(i, v), get_id(i + 1, u), 1LL, d * ((j << 1) - 1LL) + c);
      }
    }
  }
  mcmf(S, T);
  cout << mcf << endl;
  return 0;
}
