#include <bits/stdc++.h>
int pi[(50 * (50 + 50 + 1) + 1)], dd[(50 * (50 + 50 + 1) + 1)],
    bb[(50 * (50 + 50 + 1) + 1)];
int pq[1 + (50 * (50 + 50 + 1) + 1)], iq[(50 * (50 + 50 + 1) + 1)], cnt;
int i2(int i) {
  return (i *= 2) > cnt ? 0
         : i < cnt && (pi[pq[i + 1]] < pi[pq[i]] ||
                       pi[pq[i + 1]] == pi[pq[i]] && dd[pq[i + 1]] < dd[pq[i]])
             ? i + 1
             : i;
}
void pq_up(int u) {
  int i, j;
  for (i = iq[u]; (j = i / 2) && (pi[u] < pi[pq[j]] ||
                                  pi[u] == pi[pq[j]] && dd[u] < dd[pq[j]]);
       i = j)
    pq[iq[pq[j]] = i] = pq[j];
  pq[iq[u] = i] = u;
}
void pq_dn(int u) {
  int i, j;
  for (i = iq[u]; (j = i2(i)) && (pi[pq[j]] < pi[u] ||
                                  pi[pq[j]] == pi[u] && dd[pq[j]] < dd[u]);
       i = j)
    pq[iq[pq[j]] = i] = pq[j];
  pq[iq[u] = i] = u;
}
void pq_add(int u) {
  iq[u] = ++cnt;
  pq_up(u);
}
int pq_remove_first() {
  int u = pq[1], v = pq[cnt--];
  iq[v] = 1;
  pq_dn(v);
  iq[u] = 0;
  return u;
}
struct L {
  struct L *next;
  int j;
} aa[50], aa_[(50 * (50 + 50 + 1) + 1)];
void add(int i, int j) {
  static struct L l91[50 * 2], *l = l91;
  l->j = j;
  l->next = aa[i].next;
  aa[i].next = l++;
}
void add_(int i, int h) {
  static struct L l91[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1)) * 2],
      *l = l91;
  l->j = h;
  l->next = aa_[i].next;
  aa_[i].next = l++;
}
int n_, m_;
int uu[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1))],
    vv[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1))],
    uv[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1))],
    cost[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1))];
int cc[(50 + (50 * 2 * 50 + 50) * ((50 + 50 + 1) - 1)) * 2];
void link(int u, int v, int cap, int cos) {
  int h = m_++;
  uu[h] = u, vv[h] = v, uv[h] = u ^ v;
  cost[h] = cos;
  cc[h << 1 ^ 0] = cap;
  add_(u, h << 1 ^ 0);
  add_(v, h << 1 ^ 1);
}
int dijkstra(int s, int t) {
  memset(pi, 0x3f, n_ * sizeof *pi);
  pi[s] = 0;
  pq_add(s);
  while (cnt) {
    struct L *l;
    int u = pq_remove_first(), v;
    int h, h_, p, d = dd[u] + 1;
    for (l = aa_[u].next; l; l = l->next)
      if (cc[h_ = l->j]) {
        h = h_ >> 1;
        p = pi[u] + ((h_ & 1) == 0 ? cost[h] : -cost[h]);
        v = u ^ uv[h];
        if (pi[v] > p || pi[v] == p && dd[v] > d) {
          pi[v] = p;
          dd[v] = d;
          bb[v] = h_;
          if (!iq[v])
            pq_add(v);
          else
            pq_up(v);
        }
      }
  }
  return pi[t] != 0x3f3f3f3f;
}
void push(int s, int t) {
  int u, h, h_;
  for (u = t; u != s; u ^= uv[h]) {
    h = (h_ = bb[u]) >> 1;
    cc[h_]--, cc[h_ ^ 1]++;
  }
}
int edmonds_karp(int s, int t) {
  int c, h;
  while (dijkstra(s, t)) push(s, t);
  c = 0;
  for (h = 0; h < m_; h++) c += cost[h] * cc[h << 1 ^ 1];
  return c;
}
int main() {
  static int ii[50];
  int n, m, k, t, c, d, h, i, j, s, u, v, x;
  scanf("%d%d%d%d%d", &n, &m, &k, &c, &d);
  for (h = 0; h < k; h++) scanf("%d", &ii[h]), ii[h]--;
  while (m--) {
    scanf("%d%d", &i, &j), i--, j--;
    add(i, j), add(j, i);
  }
  t = n + k + 1;
  n_ = n * t + 1;
  m_ = 0;
  for (i = 0; i < n; i++)
    for (s = 0; s < t - 1; s++) {
      struct L *l;
      u = i * t + s;
      for (l = aa[i].next; l; l = l->next) {
        j = l->j;
        v = j * t + s + 1;
        for (x = 1; x <= k; x++) link(u, v, 1, c + (x * 2 - 1) * d);
      }
    }
  for (i = 0; i < n; i++)
    for (s = 0; s < t - 1; s++) {
      u = i * t + s, v = u + 1;
      link(u, v, k, i == 0 ? 0 : c);
    }
  for (h = 0; h < k; h++) link(n_ - 1, ii[h] * t + 0, 1, 0);
  printf("%d\n", edmonds_karp(n_ - 1, 0 * t + t - 1));
  return 0;
}
