#include <bits/stdc++.h>
using namespace std;
int tot = 1, to[1000005 * 2], head[1000005], net[1000005 * 2], f[1000005 * 2],
    w[1000005 * 2], fl[100005], h[100005], q[1000005];
int las[100005], ans, str, edd, nm, c[100005], n, m, k, va, vb, d[1005][1005],
    idx, a1, a2;
int gets() {
  int v = 0;
  char ch;
  bool f = 0;
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = 1;
  v = ch - 48;
  while (isdigit(ch = getchar())) v = (v << 1) + (v << 3) + ch - 48;
  return f ? -v : v;
}
void ins(int frm, int to2, int flw, int v1) {
  to[++tot] = to2, net[tot] = head[frm], f[tot] = flw, w[tot] = v1,
  head[frm] = tot;
  to[++tot] = frm, net[tot] = head[to2], f[tot] = 0, w[tot] = -v1,
  head[to2] = tot;
}
int spfa() {
  int x;
  for (int i = 0; i <= edd; i++) h[i] = 1000000007, fl[i] = 0;
  h[str] = 0, fl[str] = 1;
  int l = 0, r = 1;
  while (r ^ l) {
    x = q[l++];
    if (x == edd) continue;
    for (int t = head[x]; t; t = net[t])
      if (f[t] && w[t] + h[x] < h[to[t]]) {
        h[to[t]] = w[t] + h[x];
        las[to[t]] = t;
        if (!fl[to[t]]) {
          fl[to[t]] = 1;
          q[r++] = to[t];
        }
      }
    fl[x] = 0;
  }
  return h[edd] < 1000000007;
}
void work() {
  int mi;
  while (spfa()) {
    mi = 1000000007;
    for (int i = edd; i != str; i = to[(las[i] ^ 1)]) mi = min(mi, f[las[i]]);
    ans += h[edd] * mi;
    for (int i = edd; i != str; i = to[(las[i] ^ 1)])
      f[las[i]] -= mi, f[las[i] ^ 1] += mi;
  }
}
int main() {
  n = gets(), m = gets(), k = gets(), va = gets(), vb = gets();
  nm = 101;
  str = 0;
  edd = (nm + 40) * n + 4;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= nm + 2; j++) d[i][j] = ++idx;
  for (int i = 1; i <= k; i++) c[i] = gets(), ins(str, d[c[i]][0], 1, 0);
  for (int i = 1; i <= m; i++) {
    a1 = gets(), a2 = gets();
    for (int j = 0; j <= nm; j++)
      for (int l = 1; l <= k; l++)
        ins(d[a1][j], d[a2][j + 1], 1, vb * (2 * l - 1)),
            ins(d[a2][j], d[a1][j + 1], 1, vb * (2 * l - 1));
  }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= nm; j++) ins(d[i][j], d[i][j + 1], 1000000007, 0);
  for (int j = 0; j <= nm; j++) ins(d[1][j], edd, 1000000007, j * va);
  work();
  cout << ans << endl;
  return 0;
}
