#include <bits/stdc++.h>
using namespace std;
const long long INF64 = 1e18;
struct Edge {
  int from;
  int to;
  int f;
  int cost;
  Edge(){};
  Edge(int _from, int _to, int _f, int _cost)
      : from(_from), to(_to), f(_f), cost(_cost){};
};
vector<Edge> e;
const int N = 1e6 + 7;
vector<int> g[N];
long long ans = 0;
long long dist[N];
int pred[N];
int pe[N];
int inq[N];
int source = N - 2;
int target = N - 1;
int residualCapacity(int x) { return e[x].to - e[x].f; }
void dijkstra() {
  for (int i = (0); i < (N); i++) {
    dist[i] = INF64;
    pred[i] = -1;
    pe[i] = -1;
    inq[i] = 0;
  }
  dist[source] = 0;
  queue<int> q;
  q.push(source);
  inq[source] = 1;
  while (!q.empty()) {
    int k = q.front();
    q.pop();
    inq[k] = 0;
    for (auto x : g[k]) {
      if (!residualCapacity(x)) {
        continue;
      }
      int cost = e[x].cost;
      int y = e[x].from;
      if (dist[y] > dist[k] + cost) {
        dist[y] = dist[k] + cost;
        pred[y] = k;
        pe[y] = x;
        if (inq[y] == 0) {
          inq[y] = 1;
          q.push(y);
        }
      }
    }
  }
}
void pushFlow() {
  dijkstra();
  int cur = target;
  while (cur != source) {
    e[pe[cur]].f++;
    e[pe[cur] ^ 1].f--;
    cur = pred[cur];
  }
  ans += dist[target];
}
void addEdge(int x, int y, int capacity, int cost) {
  g[x].push_back(e.size());
  e.push_back(Edge(y, capacity, 0, cost));
  g[y].push_back(e.size());
  e.push_back(Edge(x, 0, 0, -cost));
}
int n, m, k, c, d;
int timeLayers = 101;
void inputAndBuildGraph() {
  scanf("%d %d %d %d %d", &n, &m, &k, &c, &d);
  for (int i = (0); i < (k); i++) {
    int x;
    scanf("%d", &x);
    --x;
    addEdge(source, x, 1, 0);
  }
  for (int i = (0); i < (timeLayers); i++) {
    addEdge(i * n, target, k, i * c);
  }
  for (int i = (0); i < (m); i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    --x, --y;
    for (int i = (0); i < (timeLayers - 1); i++)
      for (int j = (0); j < (k); j++) {
        addEdge(x + i * n, y + i * n + n, 1, d * (j * 2 + 1));
      }
    for (int i = (0); i < (timeLayers - 1); i++)
      for (int j = (0); j < (k); j++) {
        addEdge(y + i * n, x + i * n + n, 1, d * (j * 2 + 1));
      }
  }
}
void solve() {
  for (int i = (0); i < (n); i++)
    for (int j = (0); j < (timeLayers - 1); j++) {
      addEdge(i + j * n, i + j * n + n, k, 0);
    }
  for (int i = (0); i < (k); i++) {
    pushFlow();
  }
  printf("%lld\n", ans);
}
int main() {
  {
    inputAndBuildGraph();
    solve();
  }
  return 0;
}
