#include <bits/stdc++.h>
using namespace std;
char buf[1 << 20], *p1 = buf, *p2 = buf;
using namespace std;
const int MAXN = 2e6 + 1, INF = 1e8;
const int maxm = 101;
inline int read() {
  char c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MAXN, stdin), p1 == p2)
                ? EOF
                : *p1++);
  int x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MAXN, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MAXN, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  return x * f;
}
int NN, S, T;
int n, m, k, d, c;
struct node {
  int u, v, nxt;
  long long f, w;
} edge[MAXN];
int head[MAXN], num = 2;
inline void add_edge(int x, int y, long long f, long long z) {
  edge[num].u = x;
  edge[num].v = y;
  edge[num].f = f;
  edge[num].w = z;
  edge[num].nxt = head[x];
  head[x] = num++;
}
long long h[MAXN], dis[MAXN];
int PrePoint[MAXN], PreEdge[MAXN];
pair<int, long long> Dij() {
  int ansflow = 0, anscost = 0;
  while (1) {
    priority_queue<pair<int, long long> > q;
    memset(dis, 0xf, sizeof(dis));
    dis[S] = 0;
    q.push(make_pair(0, S));
    while (q.size() != 0) {
      pair<int, long long> p = q.top();
      q.pop();
      if (-p.first != dis[p.second]) continue;
      if (p.second == T) break;
      for (int i = head[p.second]; i != -1; i = edge[i].nxt) {
        int nowcost = edge[i].w + h[p.second] - h[edge[i].v];
        if (edge[i].f > 0 && dis[edge[i].v] > dis[p.second] + nowcost) {
          dis[edge[i].v] = dis[p.second] + nowcost;
          q.push(make_pair(-dis[edge[i].v], edge[i].v));
          PrePoint[edge[i].v] = p.second;
          PreEdge[edge[i].v] = i;
        }
      }
    }
    if (dis[T] > INF) break;
    for (int i = 0; i <= NN; i++) h[i] += dis[i];
    long long nowflow = INF;
    for (int now = T; now != S; now = PrePoint[now])
      nowflow = min(nowflow, edge[PreEdge[now]].f);
    for (int now = T; now != S; now = PrePoint[now])
      edge[PreEdge[now]].f -= nowflow, edge[PreEdge[now] ^ 1].f += nowflow;
    ansflow += nowflow;
    anscost += nowflow * h[T];
  }
  return make_pair(ansflow, anscost);
}
const int N = 111;
int st[55];
set<int> ve[55];
set<int> use[2];
int a[55][55];
int main() {
  while (scanf("%d%d%d%d%d", &n, &m, &k, &c, &d) != EOF) {
    memset(head, -1, sizeof(head));
    S = 0;
    int en = (N + 2) * n + 1;
    T = en;
    NN = T;
    for (int i = 0; i <= n; i++) ve[i].clear();
    use[0].clear();
    use[1].clear();
    memset(st, 0, sizeof(st));
    memset(a, 0, sizeof(a));
    for (int i = 0; i < k; i++) {
      int s;
      scanf("%d", &s);
      st[s]++;
    }
    for (int i = 1; i <= n; i++) {
      if (st[i]) {
        add_edge(0, i, st[i], 0);
        add_edge(i, 0, 0, -0);
        ;
        use[0].insert(i);
      }
    }
    for (int i = 0; i < m; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      ve[u].insert(v);
      ve[v].insert(u);
      a[u][v]++;
      a[v][u]++;
    }
    int mask = 1;
    for (int i = 0; i <= N; i++) {
      mask ^= 1;
      use[mask ^ 1].clear();
      for (auto u : use[mask]) {
        for (auto v : ve[u]) {
          use[mask ^ 1].insert(v);
          for (int cc = 1; cc <= k; cc++) {
            for (int kkk = 1; kkk <= a[u][v]; ++kkk) {
              add_edge(i * n + u, (i + 1) * n + v, 1, ((cc * 2 - 1) * d + c));
              add_edge((i + 1) * n + v, i * n + u, 0, -((cc * 2 - 1) * d + c));
              ;
            }
          }
        }
        for (int kkk = 1; kkk <= k; ++kkk) {
          add_edge(i * n + u, (i + 1) * n + u, 1, c);
          add_edge((i + 1) * n + u, i * n + u, 0, -c);
          ;
        }
        use[mask ^ 1].insert(u);
      }
      add_edge(i * n + 1, en, k, 0);
      add_edge(en, i * n + 1, 0, -0);
      ;
    }
    add_edge((N + 1) * n + 1, en, k, 0);
    add_edge(en, (N + 1) * n + 1, 0, -0);
    ;
    pair<int, long long> ans = Dij();
    printf("%lld\n", ans.second);
  }
  return 0;
}
