#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, t = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') t = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * t;
}
const int N = 5005;
const int Inf = (1 << 30);
int n, m, K, C, D, cnt = 1, tot, S, T, Flow, Cost;
int h[N], d[N], pre[N], vis[N];
struct Node {
  int x, y;
} p[N];
struct edge {
  int to, nxt, v, w;
} e[N * 200];
void Add(int x, int y, int v, int w) {
  e[++cnt] = (edge){y, h[x], v, w};
  h[x] = cnt;
  e[++cnt] = (edge){x, h[y], 0, -w};
  h[y] = cnt;
}
bool SPFA() {
  queue<int> q;
  for (int i = 1; i <= tot; i++) pre[i] = 0, d[i] = Inf;
  q.push(S), vis[S] = 1, d[S] = 0;
  while (q.size()) {
    int x = q.front();
    q.pop(), vis[x] = 0;
    for (int i = h[x]; i; i = e[i].nxt) {
      int y = e[i].to;
      if (e[i].v && d[x] + e[i].w < d[y]) {
        pre[y] = i, d[y] = d[x] + e[i].w;
        if (!vis[y]) vis[y] = 1, q.push(y);
      }
    }
  }
  return d[T] != Inf;
}
void Adjust() {
  int v = Inf, p = 0;
  for (int x = T; x ^ S; x = e[p ^ 1].to) p = pre[x], v = min(v, e[p].v);
  for (int x = T; x ^ S; x = e[p ^ 1].to)
    p = pre[x], e[p].v -= v, e[p ^ 1].v += v;
  Flow += v, Cost += v * d[T];
}
int main() {
  n = read(), m = read(), K = read(), C = read(), D = read();
  tot = n * 100, S = ++tot, T = ++tot;
  for (int i = 1; i <= K; i++) Add(S, read(), 1, 0);
  for (int i = 1; i <= m; i++) p[i] = (Node){read(), read()};
  for (int t = 0; t <= 99; t++) {
    Add(t * n + 1, T, Inf, C * t);
    if (t == 99) continue;
    for (int x = 1; x <= n; x++) Add(t * n + x, (t + 1) * n + x, Inf, 0);
    for (int i = 1; i <= m; i++) {
      int x = p[i].x, y = p[i].y;
      for (int j = 1; j <= K; j++) {
        Add(t * n + x, (t + 1) * n + y, 1, D * (2 * j - 1));
        Add(t * n + y, (t + 1) * n + x, 1, D * (2 * j - 1));
      }
    }
  }
  while (SPFA()) Adjust();
  cout << Cost;
  return 0;
}
