#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int id[N][N], nd, S, T;
int n, m, k, c, d, x[N], y[N];
struct edge {
  int from, to, next, f, v;
} e[N * N * N];
int head[N * N], tot = 1;
pair<int, int> info[N * N * N];
void add(int x, int y, int f, int v) {
  e[++tot] = (edge){x, y, head[x], f, v};
  head[x] = tot;
  e[++tot] = (edge){y, x, head[y], 0, -v};
  head[y] = tot;
}
int dis[N * N], q[N * N * N];
int vis[N * N], from[N * N];
int fl[N][N], ans;
bool bfs() {
  for (int i = (int)(1); i <= (int)(nd); i++) dis[i] = 1 << 30, vis[i] = 0;
  int h = 0, t = 1;
  q[1] = S;
  dis[S] = 0;
  while (h != t) {
    int x = q[++h];
    vis[x] = 0;
    for (int i = head[x]; i; i = e[i].next)
      if (dis[e[i].to] > dis[x] + e[i].v && e[i].f) {
        dis[e[i].to] = dis[x] + e[i].v;
        from[e[i].to] = i;
        if (!vis[e[i].to]) {
          vis[e[i].to] = 1;
          q[++t] = e[i].to;
        }
      }
  }
  return dis[T] != 1 << 30;
}
void del() {
  ans += dis[T];
  for (int i = from[T]; i; i = from[e[i].from]) {
    e[i].f--;
    e[i ^ 1].f++;
    if (!info[i].first) continue;
    int t = info[i].first, j = info[i].second;
    ++fl[t][j];
    add(id[t][x[j]], id[t - 1][y[j]], 1, c + (2 * fl[t][j] + 1) * d);
    add(id[t][y[j]], id[t - 1][x[j]], 1, c + (2 * fl[t][j] + 1) * d);
    for (int T = (int)(0); T <= (int)(3); T++)
      info[tot - T] = pair<int, int>(t, j);
  }
}
int main() {
  scanf("%d%d%d%d%d", &n, &m, &k, &c, &d);
  for (int t = (int)(0); t <= (int)(k + n); t++)
    for (int i = (int)(1); i <= (int)(n); i++) id[t][i] = ++nd;
  S = ++nd;
  T = ++nd;
  for (int t = (int)(0); t <= (int)(k + n); t++) add(id[t][1], T, 1 << 30, 0);
  for (int t = (int)(1); t <= (int)(k + n); t++)
    for (int i = (int)(1); i <= (int)(n); i++)
      add(id[t][i], id[t - 1][i], 1 << 30, c);
  for (int i = (int)(1); i <= (int)(k); i++) {
    int x;
    scanf("%d", &x);
    add(S, id[k + n][x], 1, 0);
  }
  for (int i = (int)(1); i <= (int)(m); i++) {
    scanf("%d%d", &x[i], &y[i]);
    for (int j = (int)(1); j <= (int)(k + n); j++) {
      add(id[j][x[i]], id[j - 1][y[i]], 1, c + d);
      add(id[j][y[i]], id[j - 1][x[i]], 1, c + d);
      for (int T = (int)(0); T <= (int)(3); T++)
        info[tot - T] = pair<int, int>(j, i);
    }
  }
  for (; bfs(); del())
    ;
  printf("%d\n", ans);
}
