#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
struct YEE {
  struct Edge {
    int pre, to, flow, w;
    Edge(int a, int b, int c, int d) : pre(a), to(b), flow(c), w(d) {}
  };
  vector<int> head, preN, preE, dis;
  vector<Edge> edge;
  YEE(int n) : head(n + 1, -1), preE(n + 1), preN(n + 1), dis(n + 1) {}
  void add(int u, int v, int f, int w) {
    edge.emplace_back(head[u], v, f, w);
    head[u] = edge.size() - 1;
    edge.emplace_back(head[v], u, 0, -w);
    head[v] = edge.size() - 1;
  }
  bool SP(int st, int ed) {
    static priority_queue<pair<int, int>, vector<pair<int, int>>,
                          greater<pair<int, int>>>
        pq;
    while (pq.size()) pq.pop();
    fill((dis).begin(), (dis).end(), INF);
    fill((preE).begin(), (preE).end(), -1);
    fill((preN).begin(), (preN).end(), -1);
    dis[st] = 0;
    pq.push({0, st});
    while (pq.size()) {
      int x = pq.top().second;
      int d = pq.top().first;
      pq.pop();
      if (dis[x] != d) continue;
      for (int i = head[x]; i != -1; i = edge[i].pre) {
        if (edge[i].flow == 0 || dis[edge[i].to] <= dis[x] + edge[i].w)
          continue;
        dis[edge[i].to] = dis[x] + edge[i].w;
        preN[edge[i].to] = x;
        preE[edge[i].to] = i;
        pq.push({dis[edge[i].to], edge[i].to});
      }
    }
    return dis[ed] != INF;
  }
  pair<int, int> solve(int st, int ed) {
    int flow = 0, weight = 0;
    while (SP(st, ed)) {
      int p = ed, f = INF;
      while (p != st) {
        f = min(edge[preE[p]].flow, f);
        p = preN[p];
      }
      p = ed;
      weight += dis[ed];
      flow += f;
      while (p != st) {
        edge[preE[p]].flow -= f;
        edge[preE[p] ^ 1].flow += f;
        p = preN[p];
      }
    }
    return {flow, weight};
  }
};
int n, m, k, c, d;
int u[55], v[55];
int main() {
  scanf("%d%d%d%d%d", &n, &m, &k, &c, &d);
  YEE cute(50 * 105);
  for (int i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    cute.add(0, x, 1, 0);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", u + i, v + i);
  }
  for (int t = 0; t < 100; t++) {
    for (int i = 2; i <= n; i++) {
      cute.add(t * 50 + i, t * 50 + 50 + i, k, c);
    }
  }
  for (int t = 0; t <= 100; t++) {
    cute.add(t * 50 + 1, 50 * 105, k, 0);
  }
  for (int t = 0; t < 100; t++) {
    for (int i = 0; i < m; i++) {
      for (int j = 1; j <= k; j++) {
        cute.add(t * 50 + u[i], t * 50 + 50 + v[i], 1,
                 ((j * j) - ((j - 1) * (j - 1))) * d + c);
        cute.add(t * 50 + v[i], t * 50 + 50 + u[i], 1,
                 ((j * j) - ((j - 1) * (j - 1))) * d + c);
      }
    }
  }
  printf("%d\n", cute.solve(0, 50 * 105).second);
  return 0;
}
