#include <bits/stdc++.h>
using namespace std;
int n, m, s, t, k, c, d;
int a[105];
int head[500005], cur[500005];
struct node {
  int to, next, w, f;
} edge[2 * 500005];
int cnt = 0;
void addedge(int x, int y, int z, int w) {
  edge[cnt].to = y;
  edge[cnt].w = z;
  edge[cnt].f = w;
  edge[cnt].next = head[x];
  head[x] = cnt;
  cnt++;
  edge[cnt].to = x;
  edge[cnt].w = 0;
  edge[cnt].f = -w;
  edge[cnt].next = head[y];
  head[y] = cnt;
  cnt++;
}
int dis[500005], vis[500005], pre[500005], last[500005], flow[500005];
int maxflow = 0, mincost = 0;
bool bfs() {
  queue<int> q;
  while (!q.empty()) q.pop();
  memset(dis, 0x3f, sizeof(dis));
  memset(flow, 0x3f, sizeof(flow));
  memset(vis, 0, sizeof(vis));
  dis[s] = 0;
  pre[t] = 0;
  q.push(s);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    vis[u] = 0;
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].to;
      if (edge[i].w > 0 && dis[v] > dis[u] + edge[i].f) {
        dis[v] = dis[u] + edge[i].f;
        pre[v] = u;
        last[v] = i;
        flow[v] = min(edge[i].w, flow[u]);
        if (!vis[v]) {
          vis[v] = 1;
          q.push(v);
        }
      }
    }
  }
  return pre[t];
}
void dinic() {
  while (bfs()) {
    maxflow += flow[t];
    mincost += flow[t] * dis[t];
    int now = t;
    while (now != s) {
      edge[last[now]].w -= flow[t];
      edge[last[now] ^ 1].w += flow[t];
      now = pre[now];
    }
  }
}
int main() {
  memset(head, -1, sizeof(head));
  scanf("%d%d%d%d%d", &n, &m, &k, &c, &d);
  for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
  s = 0, t = 100 * n + 1;
  for (int i = 1; i <= k; i++) addedge(s, (a[i] - 1) * 100 + 1, 1, 0);
  for (int i = 1; i <= 100; i++) addedge(i, t, k, 0);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j < 100; j++)
      addedge((i - 1) * 100 + j, (i - 1) * 100 + j + 1, k, c);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    for (int j = 1; j < 100; j++)
      for (int k = 1; k <= 24; k++)
        addedge((x - 1) * 100 + j, (y - 1) * 100 + j + 1, 1,
                (2 * k - 1) * d + c),
            addedge((y - 1) * 100 + j, (x - 1) * 100 + j + 1, 1,
                    (2 * k - 1) * d + c);
  }
  dinic();
  printf("%d\n", mincost);
  return 0;
}
