#include <bits/stdc++.h>
using namespace std;
const int maxn = 6010, INF = 0x3f3f3f3f;
int n, m, k, c, d, cnt, ans, a[maxn], x[maxn], y[maxn];
int head[maxn], pre[maxn], dist[maxn], inq[maxn];
queue<int> q;
struct edge {
  int to, cap, cost, nxt;
} e[2000010];
int id(int t, int v) { return t * n + v; }
void add(int from, int to, int cap, int cost) {
  e[cnt] = (edge){to, cap, cost, head[from]}, head[from] = cnt++;
  e[cnt] = (edge){from, 0, -cost, head[to]}, head[to] = cnt++;
}
bool spfa(int s, int t) {
  memset(dist, 0x3f, sizeof(dist));
  q.push(s), dist[s] = 0;
  while (!q.empty()) {
    int v = q.front();
    q.pop(), inq[v] = 0;
    for (int i = head[v], u; ~i; i = e[i].nxt) {
      if (e[i].cap && dist[u = e[i].to] > dist[v] + e[i].cost) {
        dist[u] = dist[v] + e[i].cost, pre[u] = i;
        if (!inq[u]) q.push(u), inq[u] = 1;
      }
    }
  }
  return dist[t] < 1e9;
}
void upd(int s, int t) {
  for (int i = t; i ^ s; i = e[pre[i] ^ 1].to) {
    e[pre[i]].cap--, e[pre[i] ^ 1].cap++;
  }
  ans += dist[t];
}
int main() {
  memset(head, -1, sizeof(head));
  scanf("%d %d %d %d %d", &n, &m, &k, &c, &d);
  int S = 0, T = 6000;
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]), add(S, id(0, a[i]), 1, 0);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  for (int t = 0; t <= 100; t++) {
    for (int i = 2; i <= n; i++) {
      add(id(t, i), id(t + 1, i), k, c);
    }
    add(id(t, 1), T, k, 0);
    for (int i = 1; i <= m; i++) {
      for (int j = 1; j <= k; j++) {
        add(id(t, x[i]), id(t + 1, y[i]), 1, c + (2 * j - 1) * d);
        add(id(t, y[i]), id(t + 1, x[i]), 1, c + (2 * j - 1) * d);
      }
    }
  }
  while (spfa(S, T)) upd(S, T);
  printf("%d\n", ans);
  return 0;
}
